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.

66 lines
1.9 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, netbsd, openbsd ]
  12. goarch: ["386", amd64, arm]
  13. exclude:
  14. - goarch: arm
  15. goos: darwin
  16. - goarch: 386
  17. goos: freebsd
  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: Set BUILD_TIME env
  30. run: echo BUILD_TIME=$(date -u +%Y-%m-%d-%H-%M) >> ${GITHUB_ENV}
  31. - name: Go Release Binaries
  32. uses: wangyoucao577/go-release-action@feature/asset-name
  33. with:
  34. github_token: ${{ secrets.GITHUB_TOKEN }}
  35. goos: ${{ matrix.goos }}
  36. goarch: ${{ matrix.goarch }}
  37. release_tag: dev
  38. overwrite: true
  39. build_flags: -tags 5BytesOffset # optional, default is
  40. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  41. # Where to run `go build .`
  42. project_path: weed
  43. binary_name: weed-large-disk
  44. asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
  45. - name: Go Release Binaries
  46. uses: wangyoucao577/go-release-action@feature/asset-name
  47. with:
  48. github_token: ${{ secrets.GITHUB_TOKEN }}
  49. goos: ${{ matrix.goos }}
  50. goarch: ${{ matrix.goarch }}
  51. release_tag: dev
  52. overwrite: true
  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 }}"