Skip to content

Commit

Permalink
fix(gha): edit auto major tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Windemiatrix committed May 29, 2024
1 parent 23568f1 commit 474da44
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/auto-tag-major-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,5 @@ jobs:
run: |
FULL_TAG=${{ github.event.release.tag_name }}
MAJOR_VERSION=$(echo "$FULL_TAG" | sed -E 's/^v([0-9]+)\..*/v\1/')
if git rev-parse "$MAJOR_VERSION" >/dev/null 2>&1; then
echo "Tag $MAJOR_VERSION already exists. Updating the tag..."
git tag -fa "$MAJOR_VERSION" -m "Update major version tag to $MAJOR_VERSION" ${{ github.event.release.target_commitish }}
else
echo "Creating new tag $MAJOR_VERSION..."
git tag -a "$MAJOR_VERSION" -m "Create major version tag $MAJOR_VERSION" ${{ github.event.release.target_commitish }}
fi
git push origin "$MAJOR_VERSION" --force
git tag -fa "$MAJOR_VERSION" -m "Update major version tag to $MAJOR_VERSION"
git push -f origin "$MAJOR_VERSION"

0 comments on commit 474da44

Please sign in to comment.