release.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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.14
  29. with:
  30. github_token: ${{ secrets.GITHUB_TOKEN }}
  31. goos: ${{ matrix.goos }}
  32. goarch: ${{ matrix.goarch }}
  33. release_tag: dev
  34. overwrite: true
  35. pre_command: export CGO_ENABLED=0
  36. build_flags: -tags 5BytesOffset # optional, default is
  37. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  38. # Where to run `go build .`
  39. project_path: weed
  40. binary_name: weed-large-disk
  41. asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
  42. - name: Go Release Binaries
  43. uses: wangyoucao577/go-release-action@v1.14
  44. with:
  45. github_token: ${{ secrets.GITHUB_TOKEN }}
  46. goos: ${{ matrix.goos }}
  47. goarch: ${{ matrix.goarch }}
  48. release_tag: dev
  49. overwrite: true
  50. pre_command: export CGO_ENABLED=0
  51. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  52. # Where to run `go build .`
  53. project_path: weed
  54. binary_name: weed-
  55. asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"