release.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. name: Release
  2. on:
  3. workflow_dispatch: # 手动触发,用于集成测试
  4. push:
  5. tags:
  6. - 'v*'
  7. jobs:
  8. # 调用各平台构建工作流
  9. build-windows:
  10. uses: ./.github/workflows/build-windows.yml
  11. secrets: inherit
  12. build-macos-arm64:
  13. uses: ./.github/workflows/build-macos-arm64.yml
  14. secrets: inherit
  15. build-macos-x64:
  16. uses: ./.github/workflows/build-macos-x64.yml
  17. secrets: inherit
  18. build-linux:
  19. uses: ./.github/workflows/build-linux.yml
  20. secrets: inherit
  21. # 所有构建完成后创建 Release
  22. release:
  23. needs: [build-windows, build-macos-arm64, build-macos-x64, build-linux]
  24. runs-on: ubuntu-latest
  25. permissions:
  26. contents: write
  27. steps:
  28. - name: Download all artifacts
  29. uses: actions/download-artifact@v4
  30. with:
  31. path: artifacts
  32. pattern: artifacts-*
  33. merge-multiple: true
  34. - name: List artifacts
  35. run: ls -la artifacts/
  36. - name: Create Release
  37. uses: softprops/action-gh-release@v1
  38. with:
  39. body: |
  40. ## Downloads
  41. ### Windows
  42. - `*-win-x64-setup.exe` - NSIS 安装程序 (推荐)
  43. - `*-win-x64-portable.exe` - 便携版
  44. - `*-win-x64.msi` - MSI 安装程序
  45. ### macOS
  46. - `*-mac-arm64.dmg` - Apple Silicon (M1/M2/M3)
  47. - `*-mac-x64.dmg` - Intel
  48. ### Linux
  49. - `*-linux-x64.deb` - Debian/Ubuntu
  50. - `*-linux-x64.rpm` - Fedora/RHEL/CentOS
  51. - `*-linux-x64.AppImage` - 通用 AppImage
  52. draft: false
  53. prerelease: false
  54. files: artifacts/*
  55. env:
  56. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}