diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..de1ba0c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,28 @@ +name: Build +on: + release: + types: [created] + + build: + name: Build + runs-on: ubuntu-latest + strategy: + matrix: + goos: [linux] + goarch: [arm, amd64] + steps: + - uses: actions/checkout@v2 + + - name: Get tag + id: tag + uses: dawidd6/action-get-tag@v1 + + - uses: wangyoucao577/go-release-action@v1.14 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goarch: ${{ matrix.goarch }} + goos: ${{ matrix.goos }} + goversion: https://dl.google.com/go/go1.16beta1.linux-amd64.tar.gz + ldflags: -X main.version=${{ steps.tag.outputs.tag }} + md5sum: false + sha256sum: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c1505b3..7f448f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,12 +18,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} WITH_V: false - release: - name: Create release - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - name: Create release id: create_release uses: actions/create-release@v1 @@ -35,27 +29,3 @@ jobs: body: This release was automatically generated by GitHub Actions. draft: false prerelease: false - - build: - name: Build - runs-on: ubuntu-latest - strategy: - matrix: - goos: [linux] - goarch: [arm, amd64] - steps: - - uses: actions/checkout@v2 - - - name: Get tag - id: tag - uses: dawidd6/action-get-tag@v1 - - - uses: wangyoucao577/go-release-action@v1.14 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - goarch: ${{ matrix.goarch }} - goos: ${{ matrix.goos }} - goversion: https://dl.google.com/go/go1.16beta1.linux-amd64.tar.gz - ldflags: -X main.version=${{ steps.tag.outputs.tag }} - md5sum: false - sha256sum: true