go-binary-release.yml 950 B

1234567891011121314151617181920212223242526
  1. name: build
  2. on:
  3. release:
  4. types: [created,published] # 表示在创建新的 Release 时触发
  5. jobs:
  6. build-go-binary:
  7. runs-on: ubuntu-latest
  8. strategy:
  9. matrix:
  10. goos: [linux, windows, darwin] # 需要打包的系统
  11. goarch: [amd64, arm64] # 需要打包的架构
  12. exclude: # 排除某些平台和架构
  13. - goarch: arm64
  14. goos: windows
  15. steps:
  16. - uses: actions/checkout@v3
  17. - uses: wangyoucao577/go-release-action@v1.30
  18. with:
  19. github_token: ${{ secrets.GITHUB_TOKEN }} # 一个默认的变量,用来实现往 Release 中添加文件
  20. goos: ${{ matrix.goos }}
  21. goarch: ${{ matrix.goarch }}
  22. goversion: 1.18 # 可以指定编译使用的 Golang 版本
  23. binary_name: "chatgpt-dingtalk" # 可以指定二进制文件的名称
  24. extra_files: LICENSE config.dev.json prompt.yml README.md # 需要包含的额外文件