Skip to content

Commit

Permalink
Bail if tag exists
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Jan 10, 2025
1 parent 428c532 commit 279171c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ jobs:
uses: actions/checkout@v4

- name: Get latest version from changelog header
run: echo "tag=$(grep -oPm 1 '(?<=### Changes in )(.*)(?=:)' CHANGELOG.md)" >> "$GITHUB_OUTPUT"
run: |
echo "tag=$(grep -oPm 1 '(?<=### Changes in )(.*)(?=:)' CHANGELOG.md)" >> "$GITHUB_OUTPUT"
id: changelog

- name: Bail if tag exists
run: |
! git show-ref -q --tags "${{ steps.changelog.outputs.tag }}" || {
echo "Tag ${{ steps.changelog.outputs.tag }} already exists"
exit 1
}
- name: Setup Git
run: |
git config user.name 'github-actions[bot]'
Expand Down

0 comments on commit 279171c

Please sign in to comment.