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.

64 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. steps:
  17. - name: Check out code into the Go module directory
  18. uses: actions/checkout@v2
  19. - name: Delete old release assets
  20. uses: mknejp/delete-release-assets@v1
  21. with:
  22. token: ${{ github.token }}
  23. tag: dev
  24. fail-if-no-assets: false
  25. assets: |
  26. weed-*
  27. - name: Set BUILD_TIME env
  28. run: echo BUILD_TIME=$(date -u +%Y-%m-%d-%H-%M) >> ${GITHUB_ENV}
  29. - name: Go Release Binaries
  30. uses: wangyoucao577/go-release-action@feature/asset-name
  31. with:
  32. github_token: ${{ secrets.GITHUB_TOKEN }}
  33. goos: ${{ matrix.goos }}
  34. goarch: ${{ matrix.goarch }}
  35. release_tag: dev
  36. overwrite: true
  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@feature/asset-name
  45. with:
  46. github_token: ${{ secrets.GITHUB_TOKEN }}
  47. goos: ${{ matrix.goos }}
  48. goarch: ${{ matrix.goarch }}
  49. release_tag: dev
  50. overwrite: true
  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 }}"