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.

72 lines
2.0 KiB

  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: Delete old release assets
  22. uses: mknejp/delete-release-assets@v1
  23. with:
  24. token: ${{ github.token }}
  25. tag: dev
  26. fail-if-no-assets: false
  27. assets: |
  28. weed-*
  29. - name: Latest tag
  30. uses: EndBug/latest-tag@v1.4.0
  31. with:
  32. description: latest master branch builds
  33. tag-name: dev
  34. - name: Set BUILD_TIME env
  35. run: echo BUILD_TIME=$(date -u +%Y-%m-%d-%H-%M) >> ${GITHUB_ENV}
  36. - name: Go Release Binaries
  37. uses: wangyoucao577/go-release-action@v1.14
  38. with:
  39. github_token: ${{ secrets.GITHUB_TOKEN }}
  40. goos: ${{ matrix.goos }}
  41. goarch: ${{ matrix.goarch }}
  42. release_tag: dev
  43. overwrite: true
  44. build_flags: -tags 5BytesOffset # optional, default is
  45. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  46. # Where to run `go build .`
  47. project_path: weed
  48. binary_name: weed-large-disk
  49. asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
  50. - name: Go Release Binaries
  51. uses: wangyoucao577/go-release-action@v1.14
  52. with:
  53. github_token: ${{ secrets.GITHUB_TOKEN }}
  54. goos: ${{ matrix.goos }}
  55. goarch: ${{ matrix.goarch }}
  56. release_tag: dev
  57. overwrite: true
  58. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  59. # Where to run `go build .`
  60. project_path: weed
  61. binary_name: weed-
  62. asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"