Skip to content

Commit

Permalink
Invoke GoReleaser only for tags
Browse files Browse the repository at this point in the history
GoReleaser is configured to create a draft release with a changelog. If
the workflow tell GoReleaser to push only for published releases that
creates a loop.
  • Loading branch information
hansmi committed Aug 8, 2021
1 parent 6017655 commit e8aa098
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ on:
branches:
- main
tags:
release:
types:
- published
- 'v[0-9]+.*'

permissions:
contents: write
Expand All @@ -32,9 +30,9 @@ jobs:
id: vars
env:
EVENT_NAME: ${{ github.event_name }}
EVENT_ACTION: ${{ github.event.action }}
REF: ${{ github.ref }}
run: |
if [[ "$EVENT_NAME" = release && "$EVENT_ACTION" = published ]]; then
if [[ "$EVENT_NAME" = push && "$REF" = refs/tags/v[0-9]*.* ]]; then
args=()
else
args=( --skip-publish )
Expand Down

0 comments on commit e8aa098

Please sign in to comment.