Format permission_policy tests for cargo fmt. #7
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*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| verify: | |
| name: Verify release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Verify tag matches package version | |
| shell: bash | |
| run: | | |
| version="$(node -p "require('./package.json').version")" | |
| test "v${version}" = "${GITHUB_REF_NAME}" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run checks | |
| run: npm run check | |
| release: | |
| name: ${{ matrix.name }} | |
| needs: verify | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Windows x64 | |
| platform: windows-latest | |
| rustTarget: "" | |
| args: "--bundles nsis" | |
| - name: macOS Apple Silicon | |
| platform: macos-latest | |
| rustTarget: aarch64-apple-darwin | |
| args: "--target aarch64-apple-darwin --bundles dmg" | |
| - name: macOS Intel | |
| platform: macos-latest | |
| rustTarget: x86_64-apple-darwin | |
| args: "--target x86_64-apple-darwin --bundles dmg" | |
| runs-on: ${{ matrix.platform }} | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.rustTarget }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Configure ad-hoc macOS signing | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: echo "APPLE_SIGNING_IDENTITY=-" >> "$GITHUB_ENV" | |
| - name: Build and publish installers | |
| uses: tauri-apps/tauri-action@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Required for signed updater artifacts (must match pubkey in tauri.conf.json). | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| with: | |
| tagName: ${{ github.ref_name }} | |
| releaseName: "MarsBuild ${{ github.ref_name }}" | |
| releaseBody: "Download the installer for your platform below. In-app updates use latest.json + signed bundles." | |
| releaseDraft: false | |
| prerelease: false | |
| # Publishes latest.json for tauri-plugin-updater endpoints. | |
| uploadUpdaterJson: true | |
| args: ${{ matrix.args }} | |
| # Drop [bundle] so we don't get dmg.dmg / msi.msi / nsis.exe. | |
| # Result: MarsBuild_0.1.2_darwin_aarch64.dmg, …_windows_x64.msi, …_windows_x64.exe | |
| releaseAssetNamePattern: "[name]_[version]_[platform]_[arch][ext]" |