release
Cut a release of opencode-cmd-provider — bump the version, write the CHANGELOG entry, refresh the catalog snapshot, tag, and verify the pipeline's publish. Use when the user says "cut a release", "release", "bump to X", "tag vX.Y.Z", "publish to npm", or asks to ship a version. Not for editing the workflows or ADRs (plain code work) — for the release ritual itself.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 137
- Forks
- 17
01 前言 Front Matter
- name
- release
- description
- Cut a release of opencode-cmd-provider — bump the version, write the CHANGELOG entry, refresh the catalog snapshot, tag, and verify the pipeline's publish. Use when the user says "cut a release", "release", "bump to X", "tag vX.Y.Z", "publish to npm", or asks to ship a version. Not for editing the workflows or ADRs (plain code work) — for the release ritual itself.
03 SKILL.md 正文
Release
A Release is a versioned publication: a git tag vX.Y.Z matching
package.json, a GitHub Release, and an npm publish (see CONTEXT.md,
ADRs 0002 and 0003). The pipeline owns the mechanics; this skill is the
pre-tag ritual and post-push verification.
Version choice
patchfor fixes and chores,minorfor features,majorfor breaking changes.- Prereleases:
X.Y.Z-beta.N— the pipeline publishes them with--tag beta, never touchinglatest.
Pre-tag steps (all manual, in order)
- Bump
package.json— it is the single source of truth for the version. - Sync
package-lock.json—package-lock.jsonmirrorspackage.json'sversionfield at the top of the file and inside the rootpackages.""entry. A pure version bump inpackage.jsondoes not touch the lockfile on its own. Runnpm install --package-lock-only --no-audit --no-fundto refresh the lockfile'sversionlines to match (no dependency resolution, nonode_moduleschanges). Never hand-editpackage-lock.json— let npm write it. Include the regenerated lockfile in the release commit alongside thepackage.jsonbump so the two stay in lockstep (this is how the 1.6.0 release commit looked). - CHANGELOG.md — add a
## X.Y.Z - YYYY-MM-DDsection (promote## Unreleasedwhen it exists). This exact section becomes the GitHub Release body; without it the pipeline falls back to generated notes. - Commit — conventional style:
chore(release): X.Y.Z. The commit should includepackage.json,package-lock.json, andCHANGELOG.md. If the lockfile sync was missed, amend the commit (force-push the release branch) before the PR merges — once the PR lands, the tag has to be moved instead. - Land on main — main is protected (required
testcheck, PR review), so open a PR and merge it. The pipeline refuses tags whose commit is not on main; the tag must point at a commit that contains the bump. - Tag:
git tag vX.Y.Z && git push origin vX.Y.Z— the tag push triggersrelease.yml. Push the tag only; main is already up to date.
Catalog freshness (src/catalog/snapshot.ts / facts.ts / classification.ts / src/rates-usage/catalog.ts) is a gate, not an auto-fix:
the pipeline regenerates each catalog and fails loudly if any drifted — it never
moves the tag or pushes to main itself (see ADR 0003). Date-stamp lines are
ignored (-I 'FACTS_LAST_REFRESHED' / -I 'DEAL_LAST_REFRESHED'), so a
same-day tag passes as long as the data is fresh. Running npm run refresh
(both catalogs at once, offline from tests/fixtures/*.html) or the individual
npm run refresh:snapshot / npm run refresh:deals (add -- --fixtures for
offline) locally beforehand is optional — do it if you want the diff visible
before tagging. npm run build needs bun on PATH (TUI solid transform).
What the pipeline does (no action needed)
Asserts the tag's commit is on origin/main → asserts tag ==
v<package.json.version> → build + full test suite (bun required) →
refreshes the catalog snapshot + capability facts (including input modalities
from the CLI bundle) + deals catalog (tier/benchmarks/deals from docs) and fails
with instructions if any drifted (never moving the tag or pushing to main
itself) → OIDC npm publish (trusted publishing, provenance automatic) → GitHub
Release from the CHANGELOG section. Provenance requires the repository to be
public.
Verify after push
gh run list --limit 3— find the Release run for the tag; watch withgh run watch <run-id> --exit-status --interval 15.npm view opencode-cmd-provider@<version> dist-tags.latest— must be the new version.gh release view vX.Y.Z— exists, with the changelog as its body.- Provenance:
curl -s https://registry.npmjs.org/-/npm/v1/attestations/opencode-cmd-provider@<version>returns attestations (only from a public repository).
Failure recovery
- A stale catalog fails the run — nothing shipped. Refresh locally
(
npm run refreshfor both, ornpm run refresh:snapshot/npm run refresh:deals -- --fixtures), commit the changedsrc/catalog/{snapshot,facts,classification}.tsandsrc/rates-usage/catalog.ts(andtests/fixtures/*.htmlif you re-captured docs pages), land on main via PR, then re-tag. - The refresh cannot generate facts ("could not parse ... cli.mjs" or an
unshippable-row failure) — nothing shipped. Unlike a stale
snapshot, this cannot be fixed by refreshing locally:
npm run refresh:snapshotfails the same way. It means the CLI bundle shape changed andscripts/parse-modalities.mjsneeds updating, or a package row is unshippable after the full enrichment ladders. (A CLI outage degrades to pending notes, never a failure.) Resolve that on main via PR, then re-tag. - Publish fails — nothing shipped (npm rejects before writing) → fix, then
gh run rerun <run-id>. - Workflow file changes — if a fix touches
.github/workflows/release.yml, rerunning is not enough: the run executes the workflow from the tag's tree. Move the tag (git push origin :refs/tags/vX.Y.Z, re-tag at the fixed commit, push) so a fresh run uses the new file. - Pre-publish failure (tests, build, snapshot guard) — fix on main via PR, re-tag at the new commit; the old tag's run cannot be salvaged by rerun if the tag commit itself is at fault.
04 同仓库更多 Skills
release
暂无简介
refresh
Refresh the bundled catalogs of opencode-cmd-provider — model snapshot, capability facts, and deals catalog — including re-capturing the docs fixtures and running the coverage gate. Use when the user says "refresh", "refresh the catalogs", "update the models", "re-sync the snapshot", "re-capture fixtures", or asks to update model list/pricing/deals data. Not for cutting a release (use the release skill) or for editing the refresh scripts themselves (plain code work).