Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 23 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,31 +216,44 @@ 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

- 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
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolver = "3"

[package]
name = "autter"
version = "3.10.0"
version = "3.10.1"
edition = "2024"
default-run = "autter"

Expand Down
Loading