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.

117 lines
3.9 KiB

  1. name: "go: build dev binaries"
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. cleanup:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Delete old release assets
  12. uses: mknejp/delete-release-assets@v1
  13. with:
  14. token: ${{ github.token }}
  15. tag: dev
  16. fail-if-no-assets: false
  17. assets: |
  18. weed-*
  19. build_dev_linux:
  20. needs: cleanup
  21. runs-on: ubuntu-latest
  22. strategy:
  23. matrix:
  24. goos: [linux]
  25. goarch: [amd64]
  26. steps:
  27. - name: Check out code into the Go module directory
  28. uses: actions/checkout@v2
  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 Large Disk
  32. uses: wangyoucao577/go-release-action@bugfix/upload-fail
  33. with:
  34. github_token: ${{ secrets.GITHUB_TOKEN }}
  35. goos: ${{ matrix.goos }}
  36. goarch: ${{ matrix.goarch }}
  37. release_tag: dev
  38. overwrite: true
  39. pre_command: export CGO_ENABLED=0 && GODEBUG=http2client=0
  40. build_flags: -tags 5BytesOffset # optional, default is
  41. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  42. # Where to run `go build .`
  43. project_path: weed
  44. binary_name: weed-large-disk
  45. asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
  46. - name: Go Release Binaries Normal Volume Size
  47. uses: wangyoucao577/go-release-action@bugfix/upload-fail
  48. with:
  49. github_token: ${{ secrets.GITHUB_TOKEN }}
  50. goos: ${{ matrix.goos }}
  51. goarch: ${{ matrix.goarch }}
  52. release_tag: dev
  53. overwrite: true
  54. pre_command: export CGO_ENABLED=0 && GODEBUG=http2client=0
  55. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  56. # Where to run `go build .`
  57. project_path: weed
  58. binary_name: weed-normal-disk
  59. asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
  60. build_dev_darwin:
  61. needs: build_dev_linux
  62. runs-on: ubuntu-latest
  63. strategy:
  64. matrix:
  65. goos: [darwin]
  66. goarch: [amd64, arm64]
  67. steps:
  68. - name: Check out code into the Go module directory
  69. uses: actions/checkout@v2
  70. - name: Set BUILD_TIME env
  71. run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
  72. - name: Go Release Binaries Large Disk
  73. uses: wangyoucao577/go-release-action@bugfix/upload-fail
  74. with:
  75. github_token: ${{ secrets.GITHUB_TOKEN }}
  76. goos: ${{ matrix.goos }}
  77. goarch: ${{ matrix.goarch }}
  78. release_tag: dev
  79. overwrite: true
  80. pre_command: export CGO_ENABLED=0 && GODEBUG=http2client=0
  81. build_flags: -tags 5BytesOffset # optional, default is
  82. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  83. # Where to run `go build .`
  84. project_path: weed
  85. binary_name: weed-large-disk
  86. asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
  87. - name: Go Release Binaries Normal Volume Size
  88. uses: wangyoucao577/go-release-action@bugfix/upload-fail
  89. with:
  90. github_token: ${{ secrets.GITHUB_TOKEN }}
  91. goos: ${{ matrix.goos }}
  92. goarch: ${{ matrix.goarch }}
  93. release_tag: dev
  94. overwrite: true
  95. pre_command: export CGO_ENABLED=0 && GODEBUG=http2client=0
  96. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  97. # Where to run `go build .`
  98. project_path: weed
  99. binary_name: weed-normal-disk
  100. asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"