release.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. name: Release
  2. on:
  3. push:
  4. branches: [ master ]
  5. jobs:
  6. build:
  7. name: Build
  8. runs-on: ubuntu-latest
  9. strategy:
  10. matrix:
  11. goos: [linux, windows, darwin, freebsd ]
  12. goarch: [amd64, arm]
  13. exclude:
  14. - goarch: arm
  15. goos: darwin
  16. - goarch: arm
  17. goos: windows
  18. steps:
  19. - name: Check out code into the Go module directory
  20. uses: actions/checkout@v2
  21. - name: Wait for the deletion
  22. uses: jakejarvis/wait-action@master
  23. with:
  24. time: '30s'
  25. - name: Set BUILD_TIME env
  26. run: echo BUILD_TIME=$(date -u +%Y-%m-%d-%H-%M) >> ${GITHUB_ENV}
  27. - name: Go Release Binaries
  28. uses: wangyoucao577/go-release-action@v1.17
  29. with:
  30. goversion: 1.16
  31. github_token: ${{ secrets.GITHUB_TOKEN }}
  32. goos: ${{ matrix.goos }}
  33. goarch: ${{ matrix.goarch }}
  34. release_tag: dev
  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-large-disk
  42. asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
  43. - name: Go Release Binaries
  44. uses: wangyoucao577/go-release-action@v1.17
  45. with:
  46. goversion: 1.16
  47. github_token: ${{ secrets.GITHUB_TOKEN }}
  48. goos: ${{ matrix.goos }}
  49. goarch: ${{ matrix.goarch }}
  50. release_tag: dev
  51. overwrite: true
  52. pre_command: export CGO_ENABLED=0
  53. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  54. # Where to run `go build .`
  55. project_path: weed
  56. binary_name: weed
  57. asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"