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.

62 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]
  13. # goarch: ["386", amd64, arm]
  14. steps:
  15. - name: Check out code into the Go module directory
  16. uses: actions/checkout@v2
  17. - name: Delete old release assets
  18. uses: mknejp/delete-release-assets@v1
  19. with:
  20. token: ${{ github.token }}
  21. tag: dev
  22. fail-if-no-assets: false
  23. assets: |
  24. weed-large-disk-*
  25. weed-*
  26. - name: Set BUILD_TIME env
  27. run: echo BUILD_TIME=$(date -u +%Y-%m-%d-%H-%M) >> ${GITHUB_ENV}
  28. - name: Go Release Binaries
  29. uses: wangyoucao577/go-release-action@feature/asset-name
  30. with:
  31. github_token: ${{ secrets.GITHUB_TOKEN }}
  32. goos: ${{ matrix.goos }}
  33. goarch: ${{ matrix.goarch }}
  34. release_tag: dev
  35. overwrite: true
  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@feature/asset-name
  44. with:
  45. github_token: ${{ secrets.GITHUB_TOKEN }}
  46. goos: ${{ matrix.goos }}
  47. goarch: ${{ matrix.goarch }}
  48. release_tag: dev
  49. overwrite: true
  50. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  51. # Where to run `go build .`
  52. project_path: weed
  53. binary_name: weed-
  54. asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"