From 06cb201b24730345e31d62e4b7e471cf2dc4ab2e Mon Sep 17 00:00:00 2001 From: Andrew Goldis Date: Wed, 4 Nov 2026 21:55:55 -0700 Subject: [PATCH 1/2] chore: add /currents-release-package, the steps to release to npm The steps are the ones used for 3.0.0-beta.0 and 3.0.0: release commit, PR merged with a merge commit, publish workflow from master or from a release branch for prereleases, check from npm. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011baD3hSBFPLp26um5JriwA --- .../skills/currents-release-package/SKILL.md | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 .claude/skills/currents-release-package/SKILL.md diff --git a/.claude/skills/currents-release-package/SKILL.md b/.claude/skills/currents-release-package/SKILL.md new file mode 100644 index 0000000..95285c3 --- /dev/null +++ b/.claude/skills/currents-release-package/SKILL.md @@ -0,0 +1,111 @@ +--- +name: currents-release-package +description: Release @currents/commit-info to npm — the version and CHANGELOG commit, the PR, the publish workflow and the check of the published package. Use for latest releases and for alpha and beta prereleases. +argument-hint: [channel] +--- + +# Release @currents/commit-info to npm + +Arguments: the version and the npm channel. Without a channel, a version like +`3.1.0` goes to `latest` and `3.1.0-beta.0` goes to `beta`. Ask for anything +missing. + +Publishing changes the npm package and its dist-tag. The operator runs the +publish command; give it ready to run with `!`. You prepare the release +commit, open the PR, merge it when approved, and check the result. + +## How releases work here + +- `.github/workflows/publish.yaml` publishes. It is started by hand with a + channel (`alpha`, `beta` or `latest`). It publishes the version in + `package.json` of the ref it runs on, with npm provenance. +- The workflow checks that the version fits the channel: `3.1.0` for + `latest`, `3.1.0-beta.0` for `beta`, `3.1.0-alpha.0` for `alpha`. Then it + runs the unit tests before it publishes. +- The repo has no tags or GitHub releases for versions. `CHANGELOG.md` is + written by hand, with one `## ` section per latest release. +- PRs are merged with a merge commit and need one approval. + +## 1. Before you start + +- `npm view @currents/commit-info dist-tags` shows what each channel has now. + The new version must be higher than the channel's current version. +- Check that no publish run is in progress: + `gh run list --workflow publish.yaml`. + +## 2. Make the release commit + +- latest: on the PR that holds the changes, or on a branch + `release/` from `master`. +- alpha or beta: on a branch `release/` from the commit to test, + usually `master` or the head of an open PR. + +Then: + +- `npm version --no-git-tag-version` sets the version in + `package.json` and `package-lock.json`. +- For latest, add a `## ` section at the top of `CHANGELOG.md`. Lead + with what users of the package notice: breaking changes and what callers + have to change first, then the other changes. The earlier sections show the + style. Prereleases get no section. +- Commit with `chore: release `. + +## 3. Check the package + +- `npm test` (lint, then the unit tests) on Node.js 22 and 24, the versions + `.github/workflows/main.yml` tests. +- `npm pack`, install the tarball in an empty folder, and call + `commitInfo()` in a git repository. `npm ls --omit=dev` there shows the + runtime dependencies; compare them with the previous version. +- For a breaking change, check the packages that use commit-info with the + packed version: `@currents/cmd` in currents-dev/currents-reporter and the + Currents Playwright reporter. + +## 4. PR and merge + +For latest: + +- Open the PR to `master`, or add the release commit to the PR that holds + the changes. The body lists the changes, the checks from step 3 with their + results, and starts with an `Owner: @` line naming the operator. +- Load the `writing-voice` skill if it is available, and show the body to the + operator before you open the PR. +- When CI passes and the PR is approved, merge it with a merge commit: + `gh pr merge --merge`. + +For alpha or beta, push the `release/` branch. It needs no PR: the +publish runs from the branch. + +## 5. Publish + +Give the operator the publish command. The ref is `master` for latest, and +the `release/` branch for alpha or beta: + +```bash +gh workflow run publish.yaml --repo currents-dev/commit-info --ref -f channel= +``` + +## 6. Check the published package + +- Watch the publish run to the end: `gh run watch --exit-status`. +- `npm view @currents/commit-info dist-tags` shows the new version on the + channel. `npm view @currents/commit-info@ dist.attestations` shows + the provenance. +- Install the version from npm in an empty folder and repeat the checks from + step 3. + +If the published version is broken, give the operator the commands to move +the channel back and mark the version: + +```bash +npm dist-tag add @currents/commit-info@ +npm deprecate @currents/commit-info@ "; use " +``` + +Do not unpublish: lockfiles that already have the version stop installing. + +## Report + +End with a table of the steps — release commit, PR, merge, publish run, npm +dist-tag, check from npm — each linked to its PR, run or npm page, with the +evidence you checked. From 93152f69868fb54a00fabecaba703c7ad079a42a Mon Sep 17 00:00:00 2001 From: Andrew Goldis Date: Wed, 4 Nov 2026 22:11:51 -0700 Subject: [PATCH 2/2] chore: add the #releases messages to /currents-release-package As in the platform release: announce in #releases before the publish, and reply in the thread when the version is on npm. commit-info has no Linear release pipeline. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011baD3hSBFPLp26um5JriwA --- .../skills/currents-release-package/SKILL.md | 68 ++++++++++++++++--- 1 file changed, 59 insertions(+), 9 deletions(-) diff --git a/.claude/skills/currents-release-package/SKILL.md b/.claude/skills/currents-release-package/SKILL.md index 95285c3..f731d24 100644 --- a/.claude/skills/currents-release-package/SKILL.md +++ b/.claude/skills/currents-release-package/SKILL.md @@ -1,6 +1,6 @@ --- name: currents-release-package -description: Release @currents/commit-info to npm — the version and CHANGELOG commit, the PR, the publish workflow and the check of the published package. Use for latest releases and for alpha and beta prereleases. +description: Release @currents/commit-info to npm — the version and CHANGELOG commit, the PR, the #releases announcement in Slack, the publish workflow and the check of the published package. Use for latest releases and for alpha and beta prereleases. argument-hint: [channel] --- @@ -10,9 +10,11 @@ Arguments: the version and the npm channel. Without a channel, a version like `3.1.0` goes to `latest` and `3.1.0-beta.0` goes to `beta`. Ask for anything missing. -Publishing changes the npm package and its dist-tag. The operator runs the -publish command; give it ready to run with `!`. You prepare the release -commit, open the PR, merge it when approved, and check the result. +A release changes the npm package and its dist-tag, and adds messages in +`#releases`. The operator runs the publish command; give it ready to run with +`!`. You prepare the release commit, open the PR, merge it when approved, post +the Slack messages after the operator approves each draft, and check the +result. ## How releases work here @@ -25,6 +27,8 @@ commit, open the PR, merge it when approved, and check the result. - The repo has no tags or GitHub releases for versions. `CHANGELOG.md` is written by hand, with one `## ` section per latest release. - PRs are merged with a merge commit and need one approval. +- There is no Linear release pipeline for commit-info. The publish workflow + does not post to Slack. ## 1. Before you start @@ -76,7 +80,31 @@ For latest: For alpha or beta, push the `release/` branch. It needs no PR: the publish runs from the branch. -## 5. Publish +## 5. Announce the release in Slack + +Channel: `#releases` (`C075P0RFGAW`). Draft the message, show it to the +operator, and post it with `slack_send_message` only after they approve. Use +Slack formatting: `*bold*`, `` links and `•` bullets. Markdown +links do not render. + +```text +:rocket: Release: `@currents/commit-info ` (npm ``) + + · · + + + +*Needs attention* +• + +Issues: +``` + +Leave out a line that has nothing in it. Keep the message's `ts` for step 7: +it is the `p` part of the permalink, with a decimal point before the +last six digits (`p1787270016651819` → `1787270016.651819`). + +## 6. Publish Give the operator the publish command. The ref is `master` for latest, and the `release/` branch for alpha or beta: @@ -85,7 +113,7 @@ the `release/` branch for alpha or beta: gh workflow run publish.yaml --repo currents-dev/commit-info --ref -f channel= ``` -## 6. Check the published package +## 7. Check the published package - Watch the publish run to the end: `gh run watch --exit-status`. - `npm view @currents/commit-info dist-tags` shows the new version on the @@ -104,8 +132,30 @@ npm deprecate @currents/commit-info@ "; use , + reply_broadcast: true, + message: ... +}) +``` + +```text +*@currents/commit-info * is on npm ``. + +Checked from npm: + + · +``` + +For alpha and beta, post the reply without `reply_broadcast`. If you rolled +the version back, say so in the reply. + ## Report -End with a table of the steps — release commit, PR, merge, publish run, npm -dist-tag, check from npm — each linked to its PR, run or npm page, with the -evidence you checked. +End with a table of the steps — release commit, PR, merge, Slack +announcement, publish run, npm dist-tag, check from npm, Slack reply — each +linked to its PR, run, message or npm page, with the evidence you checked.