Create Release #1
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: Create Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # 通过 git tag 触发发布 | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download Artifact from Build Workflow | |
| uses: dawidd6/action-download-artifact@v10 | |
| with: | |
| workflow: build.yml | |
| repo: ${{ github.repository }} # 同一仓库 | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| path: artifacts/ | |
| - name: Rename IPA | |
| run: mv artifacts/ios-ipa/zero.ipa artifacts/zero-${{ github.ref_name }}.ipa | |
| - name: Rename APK | |
| run: mv artifacts/android-apk/zero.apk artifacts/zero-${{ github.ref_name }}.apk | |
| - name: Backend | |
| run: zip -r server-${{ github.ref_name }}.zip backend | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| artifacts/zero-${{ github.ref_name }}.ipa | |
| artifacts/zero-${{ github.ref_name }}.apk | |
| server-${{ github.ref_name }}.zip | |
| name: Release ${{ github.ref_name }} | |
| tag_name: ${{ github.ref_name }} | |
| env: | |
| GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' |