release.yml 766 B

123456789101112131415161718192021222324252627
  1. # 发行:需要一台已安装 SPT 客户端的自托管 runner(客户端程序集为专有文件,无法在公共 runner 构建)。
  2. # 用法:在 Actions 页手动触发,或推送 v* 标签。
  3. name: 发行
  4. on:
  5. workflow_dispatch:
  6. push:
  7. tags: ["v*"]
  8. jobs:
  9. package:
  10. runs-on: [self-hosted, linux, spt]
  11. steps:
  12. - uses: actions/checkout@v4
  13. - name: 打包
  14. run: scripts/package.sh
  15. env:
  16. SPT_DIR: ${{ vars.SPT_DIR }}
  17. - uses: actions/upload-artifact@v4
  18. with:
  19. name: PerformanceScope
  20. path: artifacts/*.zip
  21. - name: 创建 Release
  22. if: startsWith(github.ref, 'refs/tags/v')
  23. uses: softprops/action-gh-release@v2
  24. with:
  25. files: artifacts/*.zip