Skip to content

Commit

Permalink
fixup! feat: update tags script
Browse files Browse the repository at this point in the history
  • Loading branch information
vdbe committed Jul 25, 2024
1 parent 86f35c9 commit 224d39b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/update-tags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ permissions:
contents: write

jobs:
github-example-tags:
update-release-tags:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -19,15 +19,16 @@ jobs:
- name: Create major/major.minor tags
run: |
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"
# Extract versions
MAJOR_VERSION=$(echo $GITHUB_REF_NAME | cut -d'.' -f1 | tr -d 'v')
MINOR_VERSION=$(echo $GITHUB_REF_NAME | cut -d'.' -f2)
PATCH_VERSION=$(echo $GITHUB_REF_NAME | cut -d'.' -f3)
git checkout "$GITHUB_REF_NAME"
# Update tags
git tag -af "v$MAJOR_VERSION" -m "$GITHUB_REF_NAME"
git checkout "$GITHUB_REF_NAME"
git tag -af "v$MAJOR_VERSION.$MINOR_VERSION" -m "$GITHUB_REF_NAME"
- name: Push tags
run: |
git push origin HEAD:main --follow-tags
# Push tags
git push orgin "v$MAJOR_VERSION" --force
git push orgin "v$MAJOR_VERSION.MINOR_VERSION" --force

0 comments on commit 224d39b

Please sign in to comment.