Skip to content

Commit

Permalink
fix: fixes release tagger crashing because it cannot find tag correct…
Browse files Browse the repository at this point in the history
…ly (#30)

* fix: fixes release tagger crashing because it cannot find tag correctly

This will allow us to push tags even if the tag already exist.

[See](https://github.com/coopnorge/github-workflow-release-drafter/actions/runs/6927907177/attempts/1)
failing run.
This change should mitigate this problem.
  • Loading branch information
arunpoudel authored Nov 21, 2023
1 parent 10fa34e commit b382bae
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/release-tagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ jobs:
# Extract vX from vX.Y.Z
NEW_TAG=$(echo "${{ github.event.release.tag_name }}" | cut -d'.' -f1)
# Check if tag already exists and delete if it does
if git show-ref --tags $NEW_TAG; then
git tag -d $NEW_TAG
git push --delete origin $NEW_TAG
fi
# Create new tag
git tag $NEW_TAG
git push origin refs/tags/$NEW_TAG
git tag -f $NEW_TAG -m "Forcing tag to match release"
git push origin -f $NEW_TAG

0 comments on commit b382bae

Please sign in to comment.