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.

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