Skip to content

Commit

Permalink
WIP: Test if tag doesn't exist, but release does
Browse files Browse the repository at this point in the history
  • Loading branch information
domoscargin committed Jan 22, 2025
1 parent f38835a commit 1c66edd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/publish-release-to-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@ jobs:
RELEASE_NAME="GOV.UK Frontend $GH_TAG"
RELEASE_BODY=$(cat release-notes-body)
gh release create "$GH_TAG" ./release-"${GH_TAG}".zip --title "GOV.UK Frontend ${RELEASE_NAME}" --notes "$RELEASE_BODY" --draft
if gh release view "$GH_TAG" > /dev/null 2>&1; then
echo "⚠️ Release $GH_TAG already exists. Please delete the release via the GitHub UI and re-run this workflow"
exit 1
else
gh release create "$GH_TAG" ./release-"${GH_TAG}".zip --title "GOV.UK Frontend ${RELEASE_NAME}" --notes "$RELEASE_BODY" --draft
fi

0 comments on commit 1c66edd

Please sign in to comment.