Skip to content

Commit 3abf2a5

Browse files
abueideclaude
andcommitted
refactor(ci): move tag creation from bump.sh to release.yml
Tags are now created by the release workflow after a PR merges, instead of locally by bump.sh. This enforces CI checks as a gate before releases land on main. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent eda9a5b commit 3abf2a5

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
MSG=$(git log -1 --format=%s)
2525
if echo "$MSG" | grep -qE '^chore\(release\):'; then
2626
echo "is_release=true" >> "$GITHUB_OUTPUT"
27-
TAG=$(git describe --tags --exact-match HEAD 2>/dev/null || echo "")
27+
TAG=$(echo "$MSG" | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+')
2828
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
2929
BODY=$(git log -1 --format=%b)
3030
echo "body<<EOF" >> "$GITHUB_OUTPUT"
@@ -48,6 +48,12 @@ jobs:
4848
echo "devbox-mcp not changed in this release"
4949
fi
5050
51+
- name: Create git tag
52+
if: steps.check.outputs.is_release == 'true' && steps.check.outputs.tag != ''
53+
run: |
54+
git tag "${{ steps.check.outputs.tag }}"
55+
git push origin "${{ steps.check.outputs.tag }}"
56+
5157
- name: Create GitHub Release
5258
if: steps.check.outputs.is_release == 'true' && steps.check.outputs.tag != ''
5359
env:

scripts/bump.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,11 @@ EOF
227227
)"
228228

229229
TAG="v${NEW_VERSION}"
230-
git tag "$TAG"
231230

232-
echo "Committed and tagged: $TAG"
231+
echo "Committed: $TAG"
233232
echo ""
234233
echo "To publish this release:"
235-
echo " git push origin main --tags"
234+
echo " 1. Push your branch and open a PR:"
235+
echo " git push -u origin HEAD"
236+
echo " gh pr create --title 'chore(release): bump ${PLUGIN_NAMES} to ${TAG}'"
237+
echo " 2. After CI passes and the PR is merged, release.yml will create the tag and GitHub Release."

0 commit comments

Comments
 (0)