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.

61 lines
2.1 KiB

  1. # This is a basic workflow to help you get started with Actions
  2. name: "go: build versioned binaries"
  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]
  16. exclude:
  17. - goarch: arm
  18. goos: darwin
  19. - goarch: 386
  20. goos: darwin
  21. - goarch: arm
  22. goos: windows
  23. - goarch: arm64
  24. goos: windows
  25. # Steps represent a sequence of tasks that will be executed as part of the job
  26. steps:
  27. # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
  28. - uses: actions/checkout@v2
  29. - name: Go Release Binaries
  30. uses: wangyoucao577/go-release-action@v1.20
  31. with:
  32. github_token: ${{ secrets.GITHUB_TOKEN }}
  33. goos: ${{ matrix.goos }}
  34. goarch: ${{ matrix.goarch }}
  35. overwrite: true
  36. pre_command: export CGO_ENABLED=0
  37. # build_flags: -tags 5BytesOffset # optional, default is
  38. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  39. # Where to run `go build .`
  40. project_path: weed
  41. binary_name: weed
  42. asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
  43. - name: Go Release Large Disk Binaries
  44. uses: wangyoucao577/go-release-action@v1.20
  45. with:
  46. github_token: ${{ secrets.GITHUB_TOKEN }}
  47. goos: ${{ matrix.goos }}
  48. goarch: ${{ matrix.goarch }}
  49. overwrite: true
  50. pre_command: export CGO_ENABLED=0
  51. build_flags: -tags 5BytesOffset # optional, default is
  52. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  53. # Where to run `go build .`
  54. project_path: weed
  55. binary_name: weed
  56. asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_large_disk"