Release #6
Workflow file for this run
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: Release | |
| on: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| NODE_VERSION: 22 | |
| # tauri-build statically links the versioned VC runtime when this is enabled. | |
| STATIC_VCRUNTIME: "true" | |
| jobs: | |
| build-tauri: | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: macos-latest | |
| args: "--target aarch64-apple-darwin" | |
| rust-targets: "aarch64-apple-darwin,x86_64-apple-darwin" | |
| binary-arch: arm64 | |
| - platform: macos-latest | |
| args: "--target x86_64-apple-darwin" | |
| rust-targets: "aarch64-apple-darwin,x86_64-apple-darwin" | |
| binary-arch: x86_64 | |
| - platform: ubuntu-22.04 | |
| args: "" | |
| rust-targets: "" | |
| - platform: windows-latest | |
| args: "" | |
| rust-targets: "" | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install system dependencies (Linux only) | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: pnpm | |
| - name: Install Rust toolchain | |
| run: rustup toolchain install --no-self-update | |
| - name: Install Rust targets | |
| if: matrix['rust-targets'] != '' | |
| run: rustup target add $(echo "${{ matrix['rust-targets'] }}" | tr ',' ' ') | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| - run: pnpm install | |
| - name: Remove cached package artifacts | |
| shell: bash | |
| run: | | |
| if [ -d target ]; then | |
| find target -type d -name bundle -prune -exec rm -rf {} + | |
| fi | |
| - uses: tauri-apps/tauri-action@1deb371b0cd8bd54025b384f1cd735e725c4060f # v1.0.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tagName: v__VERSION__ | |
| releaseName: "procnote v__VERSION__" | |
| releaseBody: "See the assets to download and install this version." | |
| releaseDraft: true | |
| prerelease: false | |
| tauriScript: "pnpm run tauri" | |
| args: ${{ matrix.args }} | |
| - name: Validate packaged macOS launcher | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: | | |
| dmg=$(find target -type f -path '*/bundle/dmg/*.dmg' -print -quit) | |
| test -n "$dmg" | |
| scripts/validate-macos-package.sh "$dmg" "${{ matrix['binary-arch'] }}" | |
| - name: Validate packaged Linux launcher | |
| if: runner.os == 'Linux' | |
| shell: bash | |
| run: | | |
| deb=$(find target -type f -path '*/bundle/deb/*.deb' -print -quit) | |
| test -n "$deb" | |
| scripts/validate-linux-package.sh "$deb" | |
| - name: Validate packaged Windows launchers and installers | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $installer = Get-ChildItem target -Recurse -Filter "*-setup.exe" | | |
| Where-Object { $_.FullName.Contains("\bundle\nsis\") } | | |
| Select-Object -First 1 | |
| $msi = Get-ChildItem target -Recurse -Filter "*.msi" | | |
| Where-Object { $_.FullName.Contains("\bundle\msi\") } | | |
| Select-Object -First 1 | |
| if ($null -eq $installer) { | |
| throw "NSIS installer was not produced" | |
| } | |
| if ($null -eq $msi) { | |
| throw "MSI installer was not produced" | |
| } | |
| $legacyInstaller = Join-Path $env:RUNNER_TEMP "procnote_0.0.4_x64-setup.exe" | |
| Invoke-WebRequest ` | |
| -Uri "https://github.com/ut-issl/procnote/releases/download/v0.0.4/procnote_0.0.4_x64-setup.exe" ` | |
| -OutFile $legacyInstaller | |
| ./scripts/validate-windows-package.ps1 ` | |
| -InstallerPath $installer.FullName ` | |
| -MsiPath $msi.FullName ` | |
| -LegacyInstallerPath $legacyInstaller |