From 52d7b3c040c5f64e3d9ec62df8a3d5b9147ffa41 Mon Sep 17 00:00:00 2001 From: Henrique Santos <118177985+hcsa73@users.noreply.github.com> Date: Mon, 11 Sep 2023 16:11:08 +0100 Subject: [PATCH] Fix workflow condition (#14) Co-authored-by: Henrique Santos --- .github/workflows/release.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fff48af2..dc90eae1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,8 +7,6 @@ on: push: tags: - 'v*' - branches: - - main # Releases need permissions to read and write the repository contents. # GitHub considers creating releases and uploading assets as writing contents. @@ -19,6 +17,9 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: + - name: Check if tag belongs to main branch + if: endsWith(github.ref, 'main') == false + run: exit -1 - uses: actions/checkout@v3 with: # Allow goreleaser to access older tag information.