From 148a4f09853ccb5dca1cb8900000e536a1524d55 Mon Sep 17 00:00:00 2001 From: Fabio1988 <35898099+Fabio1988@users.noreply.github.com> Date: Sun, 29 Oct 2023 09:23:26 +0100 Subject: [PATCH] Update publish.yml --- .github/workflows/publish.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1188df0..920db41 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -52,6 +52,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} release: + if: startsWith(github.ref, 'refs/tags/') permissions: write-all runs-on: ubuntu-latest needs: [ go-build ] @@ -59,12 +60,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up Go 1.21 - if: startsWith(github.ref, 'refs/tags/') uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} - name: Build with xgo - if: startsWith(github.ref, 'refs/tags/') uses: crazy-max/ghaction-xgo@v3 with: xgo_version: latest @@ -75,13 +74,12 @@ jobs: x: false ldflags: -s -w - name: Create Release - if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v1 id: create_release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}} with: - name: Release ${{ github.ref}} + name: Release $GITHUB_REF_NAME tag_name: ${{ github.ref }} draft: true prerelease: true