From a7cd57a9d3adbc9623c50cbffa4d0bbafe11c05d Mon Sep 17 00:00:00 2001 From: iamazy Date: Thu, 23 Apr 2026 21:55:43 +0800 Subject: [PATCH] ci: add release action --- .github/workflows/package.yml | 30 ++++++++++++++++++++++++++++++ README.md | 2 +- README.zh-CN.md | 2 +- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 6c04422..1a10585 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -3,6 +3,8 @@ name: Cross-Platform Package on: push: branches: [main] + tags: + - "**" pull_request: branches: [main] @@ -144,3 +146,31 @@ jobs: compression-level: 0 if-no-files-found: error path: target/msi/${{ matrix.arch }}/*.msi + + release: + name: Publish GitHub Release + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + needs: package + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Download packaged artifacts + uses: actions/download-artifact@v4 + with: + path: dist + merge-multiple: true + + - name: Publish release + uses: softprops/action-gh-release@v2 + with: + files: | + dist/**/*.AppImage + dist/**/*.deb + dist/**/*.rpm + dist/**/*.dmg + dist/**/*.msi + fail_on_unmatched_files: true + generate_release_notes: true + prerelease: ${{ contains(github.ref_name, '-') }} diff --git a/README.md b/README.md index ae6ee7d..e97fbe1 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ It is not recommended to edit `settings.json` directly. Prefer changing settings ### Release 🦀 -You can download the binary from the [artifacts page](https://github.com/iamazy/termua/actions) +You can download the binary from the [Releases page](https://github.com/iamazy/termua/releases) ### Acknowledgements ❤️ diff --git a/README.zh-CN.md b/README.zh-CN.md index 72bd9fd..b925acb 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -108,7 +108,7 @@ termua-relay --listen 127.0.0.1:7231 ### 发布 🦀 -你可以在 [artifacts 页](https://github.com/iamazy/nxshell/actions) 下载二进制产物。 +你可以在 [Releases 页](https://github.com/iamazy/nxshell/actions) 下载二进制产物。 ### 致谢 ❤️