Skip to content

Commit

Permalink
check that desired release tag does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
friedrichwilken committed Dec 15, 2023
1 parent 289f470 commit 872428a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/scripts/check_tag_does_not_exist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

# This script checks that the TAG arg does not exist, already.

TAG="$1"

if [ $(git tag -l $TAG) ]; then
echo "Error; tag $TAG already exists"
exit 1
else
echo "tag $TAG does not exist"
fi
3 changes: 3 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
- name: Verify that the current branch has a name that starts with 'release-'
run: .github/scripts/verify_is_on_release_branch.sh

- name: Verify that the desired release tag does not already exist
run: .github/scripts/check_tag_does_not_exist.sh

create-draft:
name: Create draft release
needs: verify-head-status
Expand Down

0 comments on commit 872428a

Please sign in to comment.