Skip to content

Commit

Permalink
chore: remove '-preview' suffix from tag and add '-preview' suffix to…
Browse files Browse the repository at this point in the history
… new tag
  • Loading branch information
117 committed Mar 29, 2024
1 parent f09b76f commit cbed768
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/bump_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: remove '-preview' suffix from tag
run: |
git tag -l | while read tag; do
if [[ $tag == *"-preview" ]]; then
new_tag=${tag%-preview}
git tag $new_tag $tag
git tag -d $tag
git push origin :refs/tags/$tag
git push origin $new_tag
fi
done
- name: bump tag
id: tag_version
uses: anothrNick/github-tag-action@1.37.0
Expand All @@ -21,7 +32,7 @@ jobs:
DEFAULT_BUMP: patch
DRY_RUN: true
RELEASE_BRANCHES: main
- name: update tag
- name: add '-preview' suffix to new tag
run: |
git tag ${{ steps.tag_version.outputs.new_tag }}-preview
git push origin ${{ steps.tag_version.outputs.new_tag }}-preview

0 comments on commit cbed768

Please sign in to comment.