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 | ||
| concurrency: | ||
| group: release-${{ github.ref }} | ||
| cancel-in-progress: false | ||
| 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 | ||
| tag-name: ${{ needs.check.outputs.tag }} | ||
| release-name: sbox v${{ needs.check.outputs.version }} | ||
| release-body: ${{ needs.check.outputs.notes }} | ||
| # 构建期注入到二进制的内置 Google OAuth 凭证(见 src-tauri/build.rs) | ||
| build-env: | | ||
| GDRIVE_BUILTIN_CLIENT_ID=${{ secrets.GDRIVE_BUILTIN_CLIENT_ID }} | ||
| GDRIVE_BUILTIN_CLIENT_SECRET=${{ secrets.GDRIVE_BUILTIN_CLIENT_SECRET }} | ||
| secrets: inherit | ||
| publish-manifest: | ||
| needs: [check, release-desktop] | ||
| if: ${{ !cancelled() && needs.release-desktop.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 }} | ||
| secrets: inherit | ||