You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.4 KiB

  1. # This is a basic workflow to help you get started with Actions
  2. name: Build Versioned Releases
  3. on:
  4. release:
  5. types: [created]
  6. # Allows you to run this workflow manually from the Actions tab
  7. workflow_dispatch:
  8. # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  9. jobs:
  10. build:
  11. runs-on: ubuntu-latest
  12. strategy:
  13. matrix:
  14. goos: [linux, windows, darwin, freebsd, netbsd, openbsd]
  15. goarch: [amd64, arm, arm64, 386, ppc64le, s390x]
  16. exclude:
  17. - goarch: arm
  18. goos: darwin
  19. - goarch: 386
  20. goos: darwin
  21. - goarch: ppc64le
  22. goos: darwin
  23. - goarch: s390x
  24. goos: darwin
  25. - goarch: arm
  26. goos: windows
  27. - goarch: arm64
  28. goos: windows
  29. - goarch: ppc64le
  30. goos: windows
  31. - goarch: s390x
  32. goos: windows
  33. # Steps represent a sequence of tasks that will be executed as part of the job
  34. steps:
  35. # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
  36. - uses: actions/checkout@v2
  37. - name: Go Release Binaries
  38. uses: wangyoucao577/go-release-action@v1.19
  39. with:
  40. goversion: 1.17
  41. github_token: ${{ secrets.GITHUB_TOKEN }}
  42. goos: ${{ matrix.goos }}
  43. goarch: ${{ matrix.goarch }}
  44. overwrite: true
  45. pre_command: export CGO_ENABLED=0
  46. # build_flags: -tags 5BytesOffset # optional, default is
  47. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  48. # Where to run `go build .`
  49. project_path: weed
  50. binary_name: weed
  51. asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
  52. - name: Go Release Large Disk Binaries
  53. uses: wangyoucao577/go-release-action@v1.19
  54. with:
  55. goversion: 1.17
  56. github_token: ${{ secrets.GITHUB_TOKEN }}
  57. goos: ${{ matrix.goos }}
  58. goarch: ${{ matrix.goarch }}
  59. overwrite: true
  60. pre_command: export CGO_ENABLED=0
  61. build_flags: -tags 5BytesOffset # optional, default is
  62. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  63. # Where to run `go build .`
  64. project_path: weed
  65. binary_name: weed
  66. asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_large_disk"