Skip to content

Workflow Migration Guide

This guide documents the migration from the old workflow structure to the new orchestrated workflow system.


  • ❌ Version bumps happened immediately on main push
  • ❌ No PR review for version changes
  • ❌ Broken AI dependency (Gemini CLI)
  • ❌ Redundant sync-package-version workflow
  • ❌ Complex orchestration with race conditions
  • ❌ Difficult to debug workflow loops
  • ✅ Version bumps via reviewable PR
  • ✅ Clear sequential workflow (1→2→3→4→5→6)
  • ✅ Conventional commits (no AI dependency)
  • ✅ Single purpose per workflow
  • ✅ Loop prevention safeguards
  • ✅ Easy to debug and maintain

#FilePurposeTrigger
11-validate.ymlLint, test, build PRPR opened/updated
22-version-update.ymlCreate version bump PRPush to main
33-auto-merge.ymlAuto-merge version PRPR checks complete
44-create-tag.ymlCreate git tagVersion PR merged
55-publish.ymlPublish npm/docs/releaseTag pushed
66-cleanup.ymlClean releases/branchesAfter publish
-repo-config-check.ymlVerify squash mergeWeekly/manual

If you have any external systems referencing workflow names, update them:

Old NameNew Name
PR Validation1. Validate PR (Lint, Test, Build)
Smart Version Bump2. Version Update (Create PR)
Auto-Merge Bot3. Auto-Merge Version PR
N/A4. Create Tag (After Version Merge)
Release & Publish5. Publish Release (npm + Docs)
Cleanup Old Releases6. Cleanup (Releases & Branches)

2-version-update.yml (formerly smart-version-bump.yml):

  • Old: Triggered on push to main, created tag immediately
  • New: Triggered on push to main, creates version bump PR instead

4-create-tag.yml (new workflow):

  • Creates git tags after version bump PR is merged
  • Triggers 5-publish.yml via tag push

These workflows have been completely removed and replaced:

  • auto-merge-bot.yml → Replaced by 3-auto-merge.yml
  • sync-package-version.yml → Removed (redundant)
  • deploy-docs.yml → Merged into 5-publish.yml
  • cleanup-merged-branches.yml → Merged into 6-cleanup.yml
  • cleanup-old-releases.yml → Merged into 6-cleanup.yml
  • pr-validation.yml → Replaced by 1-validate.yml
  • smart-version-bump.yml → Replaced by 2-version-update.yml
  • release-publish.yml → Replaced by 5-publish.yml

  1. Review New Workflows

    Terminal window
    # View workflow documentation
    cat docs/src/content/docs/github-workflows/sequential-orchestration.md
  2. Verify Repository Settings

    Terminal window
    node .github/scripts/check-repo-config.cjs

    Required settings:

    • ✅ Allow squash merging
    • ❌ Disable merge commits
    • ❌ Disable rebase merging
    • ✅ Auto-delete head branches
  3. Update Branch Protection

    • Go to Settings → Branches → main
    • Require status checks: validate, security, pr-analysis
  4. Test the Flow

    Terminal window
    # Create a test PR with a feature
    git checkout -b test/new-feature
    echo "test" >> README.md
    git commit -m "feat: test new workflow"
    git push origin test/new-feature
    # Create PR and observe workflow progression
    gh pr create --title "feat: test new workflow" --body "Testing migration"
  5. Monitor First Release

    • Watch Actions tab for workflow progression
    • Verify version bump PR is created
    • Confirm auto-merge works
    • Check tag creation
    • Verify npm publication
    • Confirm docs deployment

No changes required! The contribution process remains the same:

  1. Create feature branch
  2. Make changes with conventional commits
  3. Open PR
  4. Workflows validate automatically
  5. After merge, release happens automatically

1. Developer creates PR: "feat: add alliance sounds"
→ 1-validate.yml runs (lint, test, build)
✅ All checks pass
2. Maintainer approves and merges PR (squash merge)
→ 2-version-update.yml analyzes commits
→ Finds "feat:" prefix
→ Determines MINOR version bump needed
→ Creates PR: "chore: bump version to v1.2.0"
✅ Version bump PR created
3. Version bump PR triggers workflows
→ 1-validate.yml runs on PR
→ 3-auto-merge.yml monitors checks
✅ All checks pass → auto-merge enabled
✅ PR auto-merged with squash
4. Version PR merged to main
→ 4-create-tag.yml detects version commit
→ Creates annotated tag v1.2.0
→ Pushes tag to origin
✅ Tag v1.2.0 created
5. Tag pushed triggers publish
→ 5-publish.yml starts
→ Publishes to npm with provenance
→ Deploys docs to docs branch
→ Creates GitHub release
✅ Release v1.2.0 published
6. Publish completes
→ 6-cleanup.yml runs
→ Cleans old releases (if >10 for major)
→ Deletes merged version-bump branch
✅ Repository cleaned
Total Time: ~10 minutes
Result: v1.2.0 published to npm, docs updated, release created

If issues occur, you can rollback:

Terminal window
# Disable workflows in GitHub UI
# Settings → Actions → Workflows → Disable each new workflow
Terminal window
# Temporarily use manual releases
npm version patch # or minor, or major
git push origin main --tags
gh workflow run 5-publish.yml -f tag=v1.2.3

Symptoms: After merging PR to main, no version bump PR appears

Solutions:

  1. Check workflow run in Actions tab for errors
  2. Verify commit doesn’t contain [skip ci]
  3. Check commit modified files outside paths-ignore
  4. Manually trigger: gh workflow run 2-version-update.yml

Symptoms: Version bump PR created but not auto-merging

Solutions:

  1. Check WORKFLOW_PAT secret exists and has correct permissions
  2. Verify all status checks passed (not just some)
  3. Check PR title matches: chore: bump version to v*
  4. Manually enable: gh pr merge <number> --squash --auto

Symptoms: Version PR merged but no tag appears

Solutions:

  1. Check 4-create-tag.yml workflow logs
  2. Verify commit message starts with chore: bump version
  3. Check tag doesn’t already exist: git tag -l
  4. Manually create: git tag v1.2.0 && git push origin v1.2.0

Symptoms: Tag created but npm publish failed

Solutions:

  1. Check NPM_TOKEN secret is valid
  2. Verify package.json version matches tag
  3. Check if version already published: npm view <package>@<version>
  4. Manually publish: npm publish --access public

After migration, monitor these for 1-2 weeks:

  1. Workflow Success Rate

    • Target: >95% success rate
    • Check: Actions tab → Workflows
  2. Release Frequency

    • Should remain consistent with before
    • Check: Releases tab
  3. PR to Release Time

    • Target: <15 minutes
    • Measure: PR merge time to release creation
  4. Failed Workflow Notifications

    • Watch for: workflow failure emails
    • Investigate: any repeated failures
  • Actions: https://github.com/pantheon-org/opencode-warcraft-notifications/actions
  • Releases: https://github.com/pantheon-org/opencode-warcraft-notifications/releases
  • npm: https://www.npmjs.com/package/@pantheon-ai/opencode-warcraft-notifications

  • Test complete flow with real PR
  • Monitor first 3-5 releases
  • Update team on new process
  • Document any issues found
  • Collect feedback from contributors
  • Optimize workflow performance
  • Document any edge cases
  • Update contribution guidelines if needed
  • Review workflow metrics
  • Consider additional improvements
  • Update related documentation
  • Share learnings with team


If you encounter any issues during or after migration:

  1. Check the Troubleshooting section above
  2. Review workflow logs in Actions tab
  3. Create an issue with:
    • Workflow name and run number
    • Error message or unexpected behavior
    • Steps to reproduce

Migration Performed: 2025-11-11
Migration Lead: Workflow Restructuring Initiative
Rollback Deadline: 2025-11-18 (if major issues found)