Fix workflow condition (#14)

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
This commit is contained in:
Henrique Santos 2023-09-11 16:11:08 +01:00 committed by GitHub
parent cd0e6b255d
commit 52d7b3c040
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.