diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ad9a0e..b66347f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,14 @@ name: Build +# on: +# push: +# branches: [ master ] +# pull_request: +# branches: [ master ] on: push: - branches: [ master ] - pull_request: - branches: [ master ] + tags: + - '*.*.*' jobs: @@ -37,3 +41,15 @@ jobs: GOARCH=ppc64le GOOS=linux go build -ldflags="-s -w -extldflags -static" -o dasgoclient_ppc GOARCH=arm64 GOOS=linux go build -ldflags="-s -w -extldflags -static" -o dasgoclient_arm GOOS=linux go build -ldflags="-s -w -extldflags -static" -o dasgoclient_linux + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6731272..897271e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,13 +1,13 @@ name: Release -# on: release +on: release # on: # release: # types: [created] -on: - push: - tags: - - '*.*.*' +# on: +# push: +# tags: +# - '*.*.*' jobs: @@ -41,17 +41,6 @@ jobs: GOARCH=arm64 GOOS=linux go build -ldflags="-s -w -extldflags -static" -o dasgoclient_arm GOOS=linux go build -ldflags="-s -w -extldflags -static" -o dasgoclient_linux - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - name: Upload linux binaries uses: skx/github-action-publish-binaries@master env: