publish #11
This file contains hidden or 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: 'publish' | |
| on: | |
| push: | |
| branches: | |
| - release | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| publish-desktop: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: macos-latest | |
| args: '--target aarch64-apple-darwin' | |
| rust_targets: 'aarch64-apple-darwin' | |
| label: 'macos-arm64' | |
| - platform: macos-latest | |
| args: '--target x86_64-apple-darwin' | |
| rust_targets: 'x86_64-apple-darwin' | |
| label: 'macos-intel' | |
| - platform: windows-latest | |
| args: '' | |
| rust_targets: '' | |
| label: 'windows-x64' | |
| - platform: ubuntu-22.04 | |
| args: '' | |
| rust_targets: '' | |
| label: 'linux-x64' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install dependencies (ubuntu only) | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libasound2-dev \ | |
| libwebkit2gtk-4.1-dev \ | |
| libayatana-appindicator3-dev \ | |
| libgtk-3-dev \ | |
| librsvg2-dev \ | |
| patchelf | |
| - name: install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.rust_targets }} | |
| - name: Install wasm target + trunk | |
| run: | | |
| rustup target add wasm32-unknown-unknown | |
| cargo install --locked trunk | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: './src-tauri -> target' | |
| - name: build and publish (all desktop targets) | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tagName: app-v__VERSION__ | |
| releaseName: 'App v__VERSION__' | |
| releaseBody: 'See the assets to download this version and install.' | |
| releaseDraft: true | |
| prerelease: false | |
| args: ${{ matrix.args }} |