Automate the spek release process — update CHANGELOGs, bump version, create tag, and push to trigger CI/CD.
-
Determine version bump
If the user provided a bump type or version, use it. Otherwise, use AskUserQuestion to ask:
Options: patch, minor, major
Show the current version from root package.json and 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.
-
Update CHANGELOGs
Update ALL THREE changelog files:
CHANGELOG.md (root) — the superset; write it first and filter down from it
packages/vscode/CHANGELOG.md
packages/intellij/CHANGELOG.md
Add a new version section at the top. They share one version history, but each channel's file drops the entries that don't apply to it — a Web-only change does not appear in the vscode / intellij files.
Check whether each entry actually reaches each channel before copying it across. IntelliJ in particular reimplements the core scanning logic in Kotlin, so a fix landing in @spekjs/core reaches Web and VS Code but not IntelliJ unless packages/intellij/ was touched too:
git diff --name-only v<last-version>..HEAD | grep intellij
A channel with nothing to report still gets a section — npm version bumps and publishes it at the new version either way, and a version with no notes reads as an oversight. Say what didn't apply and why (see 1.7.0 and 1.8.1).
-
Credit external contributors in BOTH READMEs
A credit has to land in four separate files — two CHANGELOGs, two READMEs — and nothing checks that they agree. v1.8.1 shipped with the credit missing from the CHANGELOG entry and from both READMEs; each was found and patched separately, after the tag.
Find who contributed since the last release:
git log v<last-version>..HEAD --format='%an <%ae>' | sort -u
Any author other than the maintainer is an external contribution — confirm the handle with gh pr view <n> --json author (the commit's email is often a users.noreply.github.com alias, not the handle).
For each one, add the credit to both files:
README.md — under ## Contributors
README.zh-TW.md — under ## 貢獻者
Follow the shape already in each file: - [@handle](https://github.com/handle) (Name) with one sub-bullet per contribution, appending a sub-bullet if the handle is already listed. Match each file's own typography — README.zh-TW.md uses full-width parentheses()and —— dashes.
The same credit belongs in the CHANGELOG entry (step 3) and the GitHub Release notes (step 11). Word it as a Thanks to [@handle](https://github.com/handle) (Name) clause, matching the existing entries.
-
Update plugin.xml change-notes
Update packages/intellij/src/main/resources/META-INF/plugin.xml — replace the <change-notes> block with the new version's changelog content in HTML format:
<change-notes><![CDATA[
<p><b><version></b></p>
<ul>
<li>...</li>
</ul>
]]></change-notes>
Only include the latest version's changes (not cumulative history).
-
Commit changelog updates
git add CHANGELOG.md packages/vscode/CHANGELOG.md packages/intellij/CHANGELOG.md packages/intellij/src/main/resources/META-INF/plugin.xml
git commit -m "Update CHANGELOG for v<version>"
If step 4 touched the READMEs, commit them too — before npm version, so the credit is inside the release rather than trailing the tag:
git add README.md README.zh-TW.md
git commit -m "docs(readme): credit @<handle> for <what>"
-
Rebuild demo page
Rebuild docs/demo.html and badges so they reflect the latest code and openspec content:
npm run build:demo
npm run build:badges
Stage the updated files:
git add docs/demo.html docs/badges/
git commit -m "Rebuild demo for v<version>"
-
Run npm version
npm version <type-or-version> --no-git-tag-version
Wait — the version lifecycle script in package.json auto-syncs to packages/vscode/package.json and packages/intellij/gradle.properties.
Actually, use the standard flow which auto-commits and tags:
npm version <type-or-version>
This will:
- Bump root
package.json version
- Run
version script (syncs packages/vscode/package.json + packages/intellij/gradle.properties + git add)
- Create git commit with version
- Create
v<version> git tag
-
Push to trigger CI/CD
Ask the user for confirmation before pushing:
"Ready to push v to origin? This will trigger the CI/CD pipelines to publish to VS Code Marketplace and JetBrains Marketplace."
git push --follow-tags
-
Update v1 major version tag