refactor(ci): rename workflow to clarify it only handles version bumps (#48)

- Rename workflow: 'Post-Merge Version & Docs Sync' → 'Post-Merge Version Bump'
- Rename job: 'Create Version & Docs Sync PR' → 'Create Version Bump PR'
- Update branch naming: 'chore/version-docs-sync-*' → 'chore/version-bump-*'
- Update PR title: 'chore: version and docs sync v*' → 'chore: bump version to v*'
- Remove confusing 'Documentation Sync' section from PR body
- Simplify skip patterns (remove 'docs: sync' pattern)
- Remove 'documentation' label from version bump PRs
- Add note clarifying that docs are handled by separate workflow

This makes it clear that version bumps and documentation syncs are
separate workflows with different triggers and purposes.
This commit is contained in:
Darren Hinde 2025-12-09 14:12:39 +00:00 committed by GitHub
parent c940fa1f1b
commit 2ef50820a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
name: Post-Merge Version & Docs Sync name: Post-Merge Version Bump
on: on:
push: push:
@ -17,10 +17,10 @@ permissions:
jobs: jobs:
check-trigger: check-trigger:
name: Check if Sync Needed name: Check if Version Bump Needed
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
should_sync: ${{ steps.check.outputs.should_sync }} should_bump: ${{ steps.check.outputs.should_bump }}
bump_type: ${{ steps.check.outputs.bump_type }} bump_type: ${{ steps.check.outputs.bump_type }}
steps: steps:
@ -63,7 +63,7 @@ jobs:
run: | run: |
# Skip if the merged PR was a version bump PR # Skip if the merged PR was a version bump PR
if [ "${{ steps.check_pr_labels.outputs.skip_version_bump }}" = "true" ]; then if [ "${{ steps.check_pr_labels.outputs.skip_version_bump }}" = "true" ]; then
echo "should_sync=false" >> $GITHUB_OUTPUT echo "should_bump=false" >> $GITHUB_OUTPUT
echo "Version bump PR detected - skipping to prevent loops" echo "Version bump PR detected - skipping to prevent loops"
exit 0 exit 0
fi fi
@ -73,8 +73,8 @@ jobs:
# Skip if this is an automated commit to prevent loops # Skip if this is an automated commit to prevent loops
# Only check the title, not the full body to avoid false positives # Only check the title, not the full body to avoid false positives
if echo "$COMMIT_TITLE" | grep -qE "\[skip ci\]|chore: bump version|docs: sync|chore: version and docs sync"; then if echo "$COMMIT_TITLE" | grep -qE "\[skip ci\]|chore: bump version"; then
echo "should_sync=false" >> $GITHUB_OUTPUT echo "should_bump=false" >> $GITHUB_OUTPUT
echo "Automated commit detected in title - skipping to prevent loops" echo "Automated commit detected in title - skipping to prevent loops"
exit 0 exit 0
fi fi
@ -93,15 +93,15 @@ jobs:
echo "bump_type=patch" >> $GITHUB_OUTPUT echo "bump_type=patch" >> $GITHUB_OUTPUT
fi fi
echo "should_sync=true" >> $GITHUB_OUTPUT echo "should_bump=true" >> $GITHUB_OUTPUT
echo "Will create version bump and docs sync PR" echo "Will create version bump PR"
create-sync-pr: create-version-bump-pr:
name: Create Version & Docs Sync PR name: Create Version Bump PR
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: check-trigger needs: check-trigger
if: | if: |
needs.check-trigger.outputs.should_sync == 'true' && needs.check-trigger.outputs.should_bump == 'true' &&
github.event.inputs.skip_version_bump != 'true' github.event.inputs.skip_version_bump != 'true'
steps: steps:
@ -120,10 +120,10 @@ jobs:
git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com" git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Create sync branch - name: Create version bump branch
id: create_branch id: create_branch
run: | run: |
BRANCH_NAME="chore/version-docs-sync-$(date +%Y%m%d-%H%M%S)" BRANCH_NAME="chore/version-bump-$(date +%Y%m%d-%H%M%S)"
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
git checkout -b "$BRANCH_NAME" git checkout -b "$BRANCH_NAME"
@ -180,7 +180,7 @@ jobs:
# Create PR body # Create PR body
cat > /tmp/pr_body.md << 'EOFPR' cat > /tmp/pr_body.md << 'EOFPR'
## 🤖 Automated Version Bump & Documentation Sync ## 🤖 Automated Version Bump
### Version Update ### Version Update
- **New Version:** v$NEW_VERSION - **New Version:** v$NEW_VERSION
@ -191,23 +191,15 @@ jobs:
- ✅ package.json version updated - ✅ package.json version updated
- ✅ CHANGELOG.md updated with latest changes - ✅ CHANGELOG.md updated with latest changes
### Documentation Sync
This PR also serves as a placeholder for documentation updates. If registry or component changes were made, please:
1. Review `registry.json` for any updates
2. Update README.md component counts if needed
3. Sync any documentation that references version numbers
4. Verify all links and references are current
### Next Steps ### Next Steps
1. Review the version bump is correct 1. Review the version bump is correct
2. Add any additional documentation updates if needed 2. Merge this PR to apply the version bump
3. Merge this PR to apply version bump
4. GitHub release will be created after merge
--- ---
**Note:** This PR was created automatically by the post-merge workflow. **Note:** This PR was created automatically by the post-merge workflow.
**Documentation updates:** If registry or component changes require documentation updates, the separate "Sync Documentation" workflow will handle that automatically when `registry.json` or `.opencode/` files are modified.
EOFPR EOFPR
# Replace variables # Replace variables
@ -216,10 +208,10 @@ jobs:
# Create PR # Create PR
gh pr create \ gh pr create \
--title "chore: version and docs sync v$NEW_VERSION" \ --title "chore: bump version to v$NEW_VERSION" \
--body-file /tmp/pr_body.md \ --body-file /tmp/pr_body.md \
--base main \ --base main \
--head "$BRANCH_NAME" \ --head "$BRANCH_NAME" \
--label "documentation,automated,version-bump" --label "automated,version-bump"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}