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.

61 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. steps:
  14. - name: Check out code into the Go module directory
  15. uses: actions/checkout@v2
  16. - name: Delete old release assets
  17. uses: mknejp/delete-release-assets@v1
  18. with:
  19. token: ${{ github.token }}
  20. tag: dev
  21. fail-if-no-assets: false
  22. assets: |
  23. weed-large-disk-*
  24. weed-*
  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@feature/asset-name
  29. with:
  30. github_token: ${{ secrets.GITHUB_TOKEN }}
  31. goos: ${{ matrix.goos }}
  32. goarch: ${{ matrix.goarch }}
  33. release_tag: dev
  34. overwrite: true
  35. build_flags: -tags 5BytesOffset # optional, default is
  36. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  37. # Where to run `go build .`
  38. project_path: weed
  39. binary_name: weed-large-disk
  40. asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
  41. - name: Go Release Binaries
  42. uses: wangyoucao577/go-release-action@feature/asset-name
  43. with:
  44. github_token: ${{ secrets.GITHUB_TOKEN }}
  45. goos: ${{ matrix.goos }}
  46. goarch: ${{ matrix.goarch }}
  47. release_tag: dev
  48. overwrite: true
  49. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  50. # Where to run `go build .`
  51. project_path: weed
  52. binary_name: weed-
  53. asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"