👷 Desktop CI builds #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release desktop | |
# Manual release with input version number | |
on: | |
workflow_dispatch: | |
# inputs: | |
# version: | |
# description: Enter the release version (e.g., 0.1.0) | |
# required: true | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
# This job builds the common webapp HTML/JS/CSS used for all platforms | |
build-webapp: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Build web application/upload artifact | |
uses: ./.github/actions/build-web | |
# This job builds the binaries for each release | |
build-app: | |
needs: build-webapp | |
strategy: | |
matrix: | |
include: | |
- platform: 'macos-latest' # for Arm based macs (M1 and above). | |
args: '--target aarch64-apple-darwin' | |
- platform: 'macos-latest' # for Intel based macs. | |
args: '--target x86_64-apple-darwin' | |
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04. | |
args: '' | |
- platform: 'windows-latest' | |
args: '' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Copy bundled web app | |
uses: actions/download-artifact@v4 | |
with: | |
name: webapp | |
path: ./apps/desktop/dist | |
- name: Setup rust | |
uses: ./.github/actions/setup-rust | |
with: | |
additional-targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
- name: install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
releaseName: 'Desktop App v__VERSION__' | |
releaseBody: 'See the assets to download this version and install.' | |
releaseDraft: true | |
prerelease: false | |
args: ${{ matrix.args }} |