Skip to content

Commit

Permalink
optimize workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mustakshif committed May 21, 2024
1 parent d4208d8 commit 201631b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,17 @@ jobs:
echo "::set-output name=content::$CHANGELOG_CONTENT"
- name: Create annotated tag with changelog
- name: Create or update annotated tag with changelog
run: |
TAG_NAME="${{ github.ref_name }}"
CHANGELOG_CONTENT="${{ steps.changelog.outputs.content }}"
if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
echo "Tag $TAG_NAME already exists. Updating tag message."
git tag -d "$TAG_NAME"
git push origin :"$TAG_NAME"
fi
git tag -a "$TAG_NAME" -m "$CHANGELOG_CONTENT"
git push origin "$TAG_NAME"
Expand Down

0 comments on commit 201631b

Please sign in to comment.