Skip to content

Commit 5016a6d

Browse files
jwaldripclaude
andcommitted
fix(ci): revert to direct push for version bump (no branch protection)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f18225f commit 5016a6d

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

.github/workflows/bump-plugin-version.yml

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ on:
1212

1313
permissions:
1414
contents: write
15-
pull-requests: write
1615

1716
jobs:
1817
bump-version:
@@ -99,32 +98,29 @@ jobs:
9998
echo "old_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
10099
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
101100
102-
- name: Create version bump PR
103-
env:
104-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
- name: Commit version bump
105102
run: |
106103
# Check if there are any changes to commit
107104
if git diff --quiet; then
108105
echo "No version changes to commit"
109106
exit 0
110107
fi
111108
112-
OLD_VERSION="${{ steps.bump-version.outputs.old_version }}"
113-
NEW_VERSION="${{ steps.bump-version.outputs.new_version }}"
114-
BRANCH="chore/bump-version-${NEW_VERSION}"
115-
116-
# Create branch, commit, and push
117-
git checkout -b "$BRANCH"
109+
# Add version files and changelog
118110
git add .claude-plugin/plugin.json .claude-plugin/marketplace.json CHANGELOG.md
119-
git commit -m "chore(plugin): bump version ${OLD_VERSION} -> ${NEW_VERSION} [skip ci]"
120-
git push origin "$BRANCH"
121-
122-
# Create PR and admin-merge (bypasses branch protection)
123-
PR_URL=$(gh pr create \
124-
--title "chore(plugin): bump version ${OLD_VERSION} -> ${NEW_VERSION}" \
125-
--body "Automated version bump based on conventional commit analysis." \
126-
--base main \
127-
--head "$BRANCH")
128-
129-
echo "Created PR: $PR_URL"
130-
gh pr merge "$PR_URL" --merge --admin --delete-branch
111+
112+
# Create commit message
113+
COMMIT_MSG="chore(plugin): bump version ${{ steps.bump-version.outputs.old_version }} -> ${{ steps.bump-version.outputs.new_version }} [skip ci]"
114+
115+
git commit -m "$COMMIT_MSG"
116+
117+
# Pull latest and rebase, handling conflicts gracefully
118+
if ! git pull --rebase origin main; then
119+
echo "Rebase conflict detected - another workflow likely pushed first"
120+
echo "Aborting rebase and exiting cleanly (next push will retry)"
121+
git rebase --abort 2>/dev/null || true
122+
exit 0
123+
fi
124+
125+
# Push the rebased commit
126+
git push origin main

0 commit comments

Comments
 (0)