From 2920ad6862292606c4bce5e0c9016a0c686a979a Mon Sep 17 00:00:00 2001 From: Sagnik Ghosh Date: Sun, 15 Nov 2026 14:55:36 +0530 Subject: [PATCH 1/3] release: publish the npm package with trusted publishing The npm publish job authenticated with an NPM_TOKEN repo secret, and npm rejected it for 3.10.0 (404 on PUT), so @autter/cli stayed at 3.9.3 while the GitHub release went out. npm caps publish tokens' lifetime, so this would keep recurring. The job now authenticates with npm trusted publishing (OIDC): npmjs.com trusts Autter-dev/autter-cli's release.yml, so there is no token to expire. It runs on ubuntu-latest (npm accepts GitHub-hosted runners only), requests id-token: write, uses Node 24 with npm 11, and skips on a re-run when the version is already on npm. The old skip-when-no-token check is gone; it would have skipped every publish once the secret is removed. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c945666..7d0f461 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -216,8 +216,13 @@ jobs: publish-npm: name: Publish npm package needs: release - runs-on: blacksmith-4vcpu-ubuntu-2404 + # npm trusted publishing (OIDC) accepts GitHub-hosted runners only, so this + # job does not use the Blacksmith runners the build jobs use. + runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') + permissions: + contents: read + id-token: write # lets npm verify this workflow instead of a stored token steps: - name: Checkout uses: actions/checkout@v4 @@ -225,23 +230,31 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 20 - registry-url: "https://registry.npmjs.org" + node-version: 24 + + # Trusted publishing needs npm 11.5.1 or newer. + - name: Update npm + run: | + npm install -g npm@11 + npm --version # The npm package is a thin bootstrapper that downloads the binaries # published by the release job above, so it must publish AFTER the # GitHub Release exists. Stamps the package with the tag's version so - # `npm i -g @autter/cli@X.Y.Z` maps 1:1 onto release vX.Y.Z. Skips (rather - # than fails) when the NPM_TOKEN secret is not configured, so a release - # never blocks on npm. + # `npm i -g @autter/cli@X.Y.Z` maps 1:1 onto release vX.Y.Z. + # + # Authenticates with npm trusted publishing: npmjs.com trusts this + # workflow (Autter-dev/autter-cli, release.yml), so there is no NPM_TOKEN + # secret to expire. If this workflow file is renamed, the trusted + # publisher on npmjs.com must be recreated to match. A re-run skips the + # publish when this version is already on npm. - name: Publish to npm working-directory: npm - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - if [ -z "${NODE_AUTH_TOKEN}" ]; then - echo "NPM_TOKEN secret not set; skipping npm publish." + version="${GITHUB_REF_NAME#v}" + if [ "$(npm view "@autter/cli@${version}" version 2>/dev/null)" = "${version}" ]; then + echo "@autter/cli@${version} is already on npm; skipping." exit 0 fi - npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version --allow-same-version + npm version "${version}" --no-git-tag-version --allow-same-version npm publish --access public From 8f4aa7026380366c143e57bc840d5a1faa6e7c53 Mon Sep 17 00:00:00 2001 From: Sagnik Ghosh Date: Sun, 15 Nov 2026 14:55:48 +0530 Subject: [PATCH 2/3] =?UTF-8?q?release:=20autter=203.10.1=20=E2=80=94=20np?= =?UTF-8?q?m=20package=20published=20with=20trusted=20publishing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 6 ++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e6ec6c..3298e9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ This changelog is automatically generated by AI when releases are published. ## [Unreleased] +## [3.10.1] - 2026-11-15 + +### Fixed + +- **`npm i -g @autter/cli` installs the current release again.** 3.10.0's GitHub release went out but its npm publish was rejected, so npm stayed on 3.9.3. The release workflow now publishes to npm with trusted publishing instead of a stored token, so the npm package can no longer fall behind because a token expired. The CLI itself is unchanged from 3.10.0. + ## [3.10.0] - 2026-11-15 ### Added diff --git a/Cargo.lock b/Cargo.lock index be7e1d8..a48be24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -258,7 +258,7 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "autter" -version = "3.10.0" +version = "3.10.1" dependencies = [ "autter", "base64", diff --git a/Cargo.toml b/Cargo.toml index a22c41e..42a3154 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ resolver = "3" [package] name = "autter" -version = "3.10.0" +version = "3.10.1" edition = "2024" default-run = "autter" From 575b3e809d191eeead1531606d6210d81008b675 Mon Sep 17 00:00:00 2001 From: Sagnik Ghosh Date: Sun, 15 Nov 2026 15:00:58 +0530 Subject: [PATCH 3/3] release: keep the npm version stamp line the bootstrapper test checks Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d0f461..36428ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -256,5 +256,5 @@ jobs: echo "@autter/cli@${version} is already on npm; skipping." exit 0 fi - npm version "${version}" --no-git-tag-version --allow-same-version + npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version --allow-same-version npm publish --access public