Merge branch 'main' of github.com:while-coder/sbox #14
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: | |
| push: | |
| tags: ['v*'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| tag: ${{ steps.release.outputs.tag }} | |
| version: ${{ steps.release.outputs.version }} | |
| notes: ${{ steps.release.outputs.notes }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - id: release | |
| uses: while-coder/workflows/.github/actions/resolve-release-info@main | |
| with: | |
| tag-prefix: v | |
| package-json: package.json | |
| changelog: CHANGELOG.md | |
| prepare-release: | |
| needs: check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Recreate GitHub Release | |
| uses: while-coder/workflows/.github/actions/recreate-github-release@main | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ needs.check.outputs.tag }} | |
| title: sbox v${{ needs.check.outputs.version }} | |
| notes: ${{ needs.check.outputs.notes }} | |
| release-desktop: | |
| needs: [check, prepare-release] | |
| uses: while-coder/workflows/.github/workflows/tauri-desktop-release.yml@main | |
| with: | |
| project-path: packages/app | |
| cargo-lock-path: packages/app/src-tauri/Cargo.lock | |
| cargo-target-path: packages/app/src-tauri/target | |
| cache-key-prefix: cargo | |
| tag-name: ${{ needs.check.outputs.tag }} | |
| release-name: sbox v${{ needs.check.outputs.version }} | |
| release-body: ${{ needs.check.outputs.notes }} | |
| matrix-json: >- | |
| [{"platform":"ubuntu-24.04","args":"","rust-target":""},{"platform":"windows-latest","args":"","rust-target":""},{"platform":"windows-latest","args":"--target aarch64-pc-windows-msvc","rust-target":"aarch64-pc-windows-msvc"}] | |
| linux-packages: libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libpipewire-0.3-dev libgbm-dev patchelf | |
| secrets: inherit | |
| release-macos: | |
| needs: [check, prepare-release] | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust-target: [aarch64-apple-darwin, x86_64-apple-darwin] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| version: 10.33.0 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: '24' | |
| cache: pnpm | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.rust-target }} | |
| - name: Cache cargo registry | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| packages/app/src-tauri/target | |
| key: macos-latest-${{ matrix.rust-target }}-cargo-${{ hashFiles('packages/app/src-tauri/Cargo.lock') }} | |
| restore-keys: | | |
| macos-latest-${{ matrix.rust-target }}-cargo- | |
| macos-latest-cargo- | |
| - run: pnpm install --frozen-lockfile | |
| - name: Import stable self-signed certificate | |
| env: | |
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| run: bash scripts/mac-import-signing-cert.sh | |
| - uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| with: | |
| projectPath: packages/app | |
| tagName: ${{ needs.check.outputs.tag }} | |
| releaseName: sbox v${{ needs.check.outputs.version }} | |
| releaseBody: ${{ needs.check.outputs.notes }} | |
| args: --target ${{ matrix.rust-target }} | |
| publish-manifest: | |
| needs: [check, release-desktop, release-macos] | |
| if: ${{ !cancelled() && needs.release-desktop.result == 'success' && needs.release-macos.result == 'success' }} | |
| uses: while-coder/workflows/.github/workflows/tauri-updater-manifest.yml@main | |
| with: | |
| product-prefix: sbox | |
| tag-name: ${{ needs.check.outputs.tag }} | |
| version: ${{ needs.check.outputs.version }} | |
| release-notes: ${{ needs.check.outputs.notes }} | |
| output-name: latest.json | |
| updater-title: Updater Manifests | |
| secrets: inherit |