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.

77 lines
2.3 KiB

  1. name: "go: build dev binaries"
  2. on:
  3. push:
  4. branches: [ master ]
  5. jobs:
  6. cleanup:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - name: Delete old release assets
  10. uses: mknejp/delete-release-assets@v1
  11. with:
  12. token: ${{ github.token }}
  13. tag: dev
  14. fail-if-no-assets: false
  15. assets: |
  16. weed-*
  17. build_dev:
  18. needs: cleanup
  19. runs-on: ubuntu-latest
  20. strategy:
  21. matrix:
  22. goos: [linux, windows, darwin, freebsd]
  23. goarch: [amd64, arm, arm64]
  24. exclude:
  25. - goarch: arm
  26. goos: darwin
  27. - goarch: 386
  28. goos: darwin
  29. - goarch: arm
  30. goos: windows
  31. - goarch: arm64
  32. goos: windows
  33. steps:
  34. - name: Check out code into the Go module directory
  35. uses: actions/checkout@v2
  36. - name: Set BUILD_TIME env
  37. run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
  38. - name: Go Release Binaries Large Disk
  39. uses: wangyoucao577/go-release-action@v1.20
  40. with:
  41. github_token: ${{ secrets.GITHUB_TOKEN }}
  42. goos: ${{ matrix.goos }}
  43. goarch: ${{ matrix.goarch }}
  44. release_tag: dev
  45. overwrite: true
  46. pre_command: export CGO_ENABLED=0
  47. build_flags: -tags 5BytesOffset # optional, default is
  48. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  49. # Where to run `go build .`
  50. project_path: weed
  51. binary_name: weed-large-disk
  52. asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
  53. - name: Go Release Binaries Normal Volume Size
  54. uses: wangyoucao577/go-release-action@v1.20
  55. with:
  56. github_token: ${{ secrets.GITHUB_TOKEN }}
  57. goos: ${{ matrix.goos }}
  58. goarch: ${{ matrix.goarch }}
  59. release_tag: dev
  60. overwrite: true
  61. pre_command: export CGO_ENABLED=0
  62. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  63. # Where to run `go build .`
  64. project_path: weed
  65. binary_name: weed-normal-disk
  66. asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"