chore(main): release git-sync-tauri 0.3.0 (#7) #22
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: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| # ── Step 1: Release Please ──────────────────────────────────────────────────── | |
| # Maintains a "Release PR" that accumulates conventional commits into a | |
| # CHANGELOG and bumps version files. When the PR is merged, it creates a | |
| # GitHub release and the build jobs below run automatically. | |
| release-please: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| release_body: ${{ steps.release.outputs.body }} | |
| steps: | |
| - uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| # ── Step 2: Build & publish artifacts ───────────────────────────────────────── | |
| # Only runs when release-please created a new release (i.e. the release PR | |
| # was just merged). Builds signed installers on all four targets and uploads | |
| # them — plus the updater latest.json — to the GitHub release. | |
| build: | |
| needs: release-please | |
| if: needs.release-please.outputs.release_created == 'true' | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # macOS: single universal binary covers both Apple Silicon and Intel. | |
| # vendored-openssl compiles OpenSSL from source via the Cargo feature, | |
| # which is required because pkg-config doesn't support cross-compilation. | |
| - platform: macos-latest | |
| args: --target universal-apple-darwin --features vendored-openssl | |
| # Linux x86-64 | |
| - platform: ubuntu-24.04 | |
| args: "" | |
| # Linux ARM64 (native runner — free for public repos) | |
| - platform: ubuntu-24.04-arm | |
| args: "" | |
| # Windows x86-64 | |
| - platform: windows-latest | |
| args: "" | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # Build from the exact tag release-please just created so that the | |
| # version numbers in Cargo.toml / tauri.conf.json are already bumped. | |
| ref: ${{ needs.release-please.outputs.tag_name }} | |
| - name: Install Linux system dependencies | |
| if: startsWith(matrix.platform, 'ubuntu') | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libappindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf | |
| # ── Node / pnpm ────────────────────────────────────────────────────────── | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: pnpm | |
| cache-dependency-path: pnpm-lock.yaml | |
| # ── Rust ───────────────────────────────────────────────────────────────── | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| # macOS needs both targets to produce a universal binary | |
| targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
| - uses: swatinem/rust-cache@v2 | |
| # ── Frontend deps ───────────────────────────────────────────────────────── | |
| - name: Install frontend dependencies | |
| run: pnpm install --frozen-lockfile | |
| # ── Build & upload to release ───────────────────────────────────────────── | |
| - uses: tauri-apps/tauri-action@action-v0.6.2 | |
| 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: | |
| # tagName lets tauri-action look up the release that release-please | |
| # already created and upload artifacts to it rather than creating a | |
| # new one. It is also passed directly into uploadVersionJSON to | |
| # construct the asset download URLs embedded in latest.json. | |
| tagName: ${{ needs.release-please.outputs.tag_name }} | |
| # Becomes the `notes` field in latest.json shown to the user when an | |
| # update is available. | |
| releaseBody: ${{ needs.release-please.outputs.release_body }} | |
| args: ${{ matrix.args }} |