Automate the spek release process — update CHANGELOGs, bump version, create tag, and push to trigger CI/CD.
Input: Optionally specify a version bump type (patch, minor, major) or an explicit version (e.g., 0.3.0). If omitted, ask.
Steps
- •
Determine version bump
If the user provided a bump type or version, use it. Otherwise, use AskUserQuestion to ask:
Options:
patch,minor,majorShow the current version from root
package.jsonand what each option would result in. - •
Gather changelog content
Look at archived changes since the last release to identify what's new:
- •Check
openspec/changes/archive/for changes archived after the last release - •Check recent git commits for context
- •Draft changelog bullet points summarizing user-facing changes
Show the draft and ask the user to confirm or edit.
- •Check
- •
Update CHANGELOGs
Update BOTH changelog files (they must stay in sync per project convention):
- •
CHANGELOG.md(root) - •
packages/vscode/CHANGELOG.md
Add a new version section at the top with the changelog content.
- •
- •
Commit changelog updates
bashgit add CHANGELOG.md packages/vscode/CHANGELOG.md git commit -m "Update CHANGELOG for v<version>"
- •
Run npm version
bashnpm version <type-or-version> --no-git-tag-version
Wait — the
versionlifecycle script in package.json auto-syncs topackages/vscode/package.json.Actually, use the standard flow which auto-commits and tags:
bashnpm version <type-or-version>
This will:
- •Bump root
package.jsonversion - •Run
versionscript (syncspackages/vscode/package.json+ git add) - •Create git commit with version
- •Create
v<version>git tag
- •Bump root
- •
Push to trigger CI/CD
Ask the user for confirmation before pushing:
"Ready to push v<version> to origin? This will trigger the CI/CD pipeline to publish to VS Code Marketplace."
bashgit push --follow-tags
- •
Show summary
Display:
- •New version number
- •Changelog content
- •Git tag created
- •CI/CD status: "Pushed. GitHub Actions will publish to VS Code Marketplace."
- •Remind: "Monitor the workflow at: https://github.com/<owner>/<repo>/actions"
Guardrails
- •ALWAYS update both CHANGELOGs (root + vscode) — they must be identical
- •ALWAYS confirm with user before
git push - •If there are uncommitted changes, warn and ask to stash or commit first
- •If the working tree is dirty after changelog update, stage only changelog files
- •Do NOT push without explicit user confirmation