chore: update readme #82
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: [master] | |
| tags: ["v*"] | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-tauri: | |
| name: build (${{ matrix.label }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| target: x86_64-unknown-linux-gnu | |
| label: Linux x86_64 | |
| artifact: fastpack-linux-x86_64.AppImage | |
| bundle: appimage | |
| glob: "appimage/*.AppImage" | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| label: Windows x86_64 | |
| artifact: fastpack-windows-x86_64-setup.exe | |
| bundle: nsis | |
| glob: "nsis/*.exe" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: pnpm | |
| cache-dependency-path: crates/fastpack-tauri/pnpm-lock.yaml | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "release-${{ matrix.target }}" | |
| cache-on-failure: "true" | |
| - name: system deps (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update -q | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libappindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf | |
| - name: install frontend deps | |
| working-directory: crates/fastpack-tauri | |
| run: pnpm install | |
| - uses: tauri-apps/tauri-action@v0 | |
| id: tauri | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| projectPath: crates/fastpack-tauri | |
| tauriScript: pnpm tauri | |
| args: --target ${{ matrix.target }} --bundles ${{ matrix.bundle }} | |
| - name: rename artifact | |
| shell: bash | |
| run: | | |
| FILE=$(find target/${{ matrix.target }}/release/bundle/${{ matrix.glob }} | head -1) | |
| cp "$FILE" "${{ matrix.artifact }}" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.artifact }} | |
| build-macos: | |
| name: build (macOS) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: pnpm | |
| cache-dependency-path: crates/fastpack-tauri/pnpm-lock.yaml | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-darwin,x86_64-apple-darwin | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: release-macos | |
| cache-on-failure: "true" | |
| - name: install frontend deps | |
| working-directory: crates/fastpack-tauri | |
| run: pnpm install | |
| - name: build ARM | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERT_P12 }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
| with: | |
| projectPath: crates/fastpack-tauri | |
| tauriScript: pnpm tauri | |
| args: --target aarch64-apple-darwin --bundles dmg | |
| - name: rename ARM artifact | |
| run: | | |
| FILE=$(find target/aarch64-apple-darwin/release/bundle/dmg/*.dmg | head -1) | |
| cp "$FILE" fastpack-macos-aarch64.dmg | |
| - name: build Intel | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERT_P12 }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
| with: | |
| projectPath: crates/fastpack-tauri | |
| tauriScript: pnpm tauri | |
| args: --target x86_64-apple-darwin --bundles dmg | |
| - name: rename Intel artifact | |
| run: | | |
| FILE=$(find target/x86_64-apple-darwin/release/bundle/dmg/*.dmg | head -1) | |
| cp "$FILE" fastpack-macos-x86_64.dmg | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: fastpack-macos-aarch64.dmg | |
| path: fastpack-macos-aarch64.dmg | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: fastpack-macos-x86_64.dmg | |
| path: fastpack-macos-x86_64.dmg | |
| release: | |
| name: release | |
| needs: [build-tauri, build-macos] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| merge-multiple: true | |
| path: artifacts/ | |
| - name: changelog (nightly) | |
| id: cliff-nightly | |
| if: github.ref == 'refs/heads/master' | |
| uses: orhun/git-cliff-action@v4 | |
| with: | |
| config: cliff.toml | |
| args: --unreleased --strip header | |
| env: | |
| OUTPUT: CHANGES.md | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: changelog (release) | |
| id: cliff-release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: orhun/git-cliff-action@v4 | |
| with: | |
| config: cliff.toml | |
| args: --latest --strip header | |
| env: | |
| OUTPUT: CHANGES.md | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: nightly release | |
| if: github.ref == 'refs/heads/master' | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: nightly | |
| name: Nightly Build | |
| prerelease: true | |
| allowUpdates: true | |
| removeArtifacts: true | |
| artifacts: "artifacts/*" | |
| body: ${{ steps.cliff-nightly.outputs.content }} | |
| - name: tagged release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| prerelease: false | |
| allowUpdates: false | |
| artifacts: "artifacts/*" | |
| body: ${{ steps.cliff-release.outputs.content }} |