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.

120 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: disable http2 env
  32. run: export GODEBUG=http2client=0
  33. - name: Go Release Binaries Large Disk
  34. uses: wangyoucao577/go-release-action@bugfix/upload-fail
  35. with:
  36. github_token: ${{ secrets.GITHUB_TOKEN }}
  37. goos: ${{ matrix.goos }}
  38. goarch: ${{ matrix.goarch }}
  39. release_tag: dev
  40. overwrite: true
  41. pre_command: export CGO_ENABLED=0
  42. build_flags: -tags 5BytesOffset # optional, default is
  43. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  44. # Where to run `go build .`
  45. project_path: weed
  46. binary_name: weed-large-disk
  47. asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
  48. - name: Go Release Binaries Normal Volume Size
  49. uses: wangyoucao577/go-release-action@bugfix/upload-fail
  50. with:
  51. github_token: ${{ secrets.GITHUB_TOKEN }}
  52. goos: ${{ matrix.goos }}
  53. goarch: ${{ matrix.goarch }}
  54. release_tag: dev
  55. overwrite: true
  56. pre_command: export CGO_ENABLED=0
  57. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  58. # Where to run `go build .`
  59. project_path: weed
  60. binary_name: weed-normal-disk
  61. asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
  62. build_dev_darwin:
  63. needs: build_dev_linux
  64. runs-on: ubuntu-latest
  65. strategy:
  66. matrix:
  67. goos: [darwin]
  68. goarch: [amd64, arm64]
  69. steps:
  70. - name: Check out code into the Go module directory
  71. uses: actions/checkout@v2
  72. - name: Set BUILD_TIME env
  73. run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
  74. - name: Go Release Binaries Large Disk
  75. uses: wangyoucao577/go-release-action@bugfix/upload-fail
  76. with:
  77. github_token: ${{ secrets.GITHUB_TOKEN }}
  78. goos: ${{ matrix.goos }}
  79. goarch: ${{ matrix.goarch }}
  80. release_tag: dev
  81. overwrite: true
  82. pre_command: export CGO_ENABLED=0
  83. build_flags: -tags 5BytesOffset # optional, default is
  84. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  85. # Where to run `go build .`
  86. project_path: weed
  87. binary_name: weed-large-disk
  88. asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
  89. - name: Go Release Binaries Normal Volume Size
  90. uses: wangyoucao577/go-release-action@bugfix/upload-fail
  91. with:
  92. github_token: ${{ secrets.GITHUB_TOKEN }}
  93. goos: ${{ matrix.goos }}
  94. goarch: ${{ matrix.goarch }}
  95. release_tag: dev
  96. overwrite: true
  97. pre_command: export CGO_ENABLED=0
  98. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  99. # Where to run `go build .`
  100. project_path: weed
  101. binary_name: weed-normal-disk
  102. asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"