Skip to content

build fixes & license #11

build fixes & license

build fixes & license #11

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest'
args: '--target aarch64-apple-darwin'
artifact_name: 'litepost_aarch64.app.tar.gz'
- platform: 'macos-latest'
args: '--target x86_64-apple-darwin'
artifact_name: 'litepost_x64.app.tar.gz'
- platform: 'ubuntu-22.04'
args: ''
artifact_name: 'litepost_${{ github.ref_name }}_amd64.AppImage'
- platform: 'windows-latest'
args: ''
artifact_name: 'litepost_${{ github.ref_name }}_x64-setup.exe'
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Install Rust (Stable)
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Install Dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install frontend dependencies
run: pnpm install
- name: Create Release
id: create_release
if: matrix.platform == 'ubuntu-22.04'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: 'LitePost ${{ github.ref_name }}'
body: 'See the assets to download this version and install.'
draft: true
prerelease: false
- name: Build the app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }}
releaseName: 'LitePost ${{ github.ref_name }}'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}
trigger-update:
needs: build
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
steps:
- name: Trigger update-json workflow
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'update-json.yml',
ref: 'main',
inputs: {
tag: '${{ github.ref_name }}'
}
});