chore: remove duplicate release-plz logic

This commit is contained in:
jdx 2025-08-18 11:57:51 -05:00
parent a2de727769
commit 70815728fd
No known key found for this signature in database
GPG key ID: 584DADE86724B407
2 changed files with 26 additions and 17 deletions

View file

@ -4,16 +4,28 @@ set -euxo pipefail
VERSION=$(jq -r .version package.json)
MAJOR_VERSION=$(echo "$VERSION" | cut -d. -f1)
# create the version tag
git tag "v$VERSION"
# create the version tag (allow it to fail if it already exists)
git tag "v$VERSION" || echo "Tag v$VERSION already exists locally"
# push changes to github
git push
# push the current tag to github
git push origin "v$VERSION"
git push origin "v$VERSION" || echo "Tag v$VERSION already exists on remote"
# set the major version tag to this release
git tag "v$MAJOR_VERSION" -f
# push the major version tag to github
git push origin "v$MAJOR_VERSION" -f
# create a release on github
gh release create "v$VERSION" --generate-notes --verify-tag
# push the major version tag to github (retry with pull if it fails)
if ! git push origin "v$MAJOR_VERSION" -f; then
echo "Failed to push v$MAJOR_VERSION tag, pulling and retrying..."
git fetch origin "refs/tags/v$MAJOR_VERSION:refs/tags/v$MAJOR_VERSION" -f
git tag "v$MAJOR_VERSION" -f
git push origin "v$MAJOR_VERSION" -f
fi
# check if release already exists before creating
if gh release view "v$VERSION" >/dev/null 2>&1; then
echo "Release v$VERSION already exists, skipping creation"
else
# create a release on github
gh release create "v$VERSION" --generate-notes --verify-tag
fi