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
26 changes: 13 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,20 @@ jobs:
- run: npm test
- run: npm run build

# Trusted publishing (OIDC): npm swaps this job's id-token for a short-lived
# publish credential, so there is no NPM_TOKEN to expire (the 90-day
# granular token silently expiring is what broke beta.34). Configured on
# npmjs.com → @instawp/cli → Settings → Trusted Publisher (InstaWP/cli,
# publish.yml). Needs npm >= 11.5.1; Node 22 bundles npm 10.
- run: npm install -g npm@^11.5.1

- name: Publish to npm
run: npm publish --access public --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Point `latest` at this release
# Pre-1.0 there's no separate stable channel, so `latest` — what a plain
# `npm i -g @instawp/cli` installs — must track the newest beta.
# Publishing with `--tag beta` does NOT move `latest`, which is how it
# got stranded on an ancient version. Keep them in sync until a stable
# 1.x exists (then publish stable to `latest` and drop this step).
run: npm dist-tag add "@instawp/cli@${GITHUB_REF_NAME#v}" latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Straight to `latest` — what `npm i -g @instawp/cli`, `instawp upgrade`
# and the update notifier read. Pre-1.0 there is no separate stable
# channel. OIDC covers `npm publish` only (not `npm dist-tag`), so we
# publish to the tag we want rather than moving it afterwards. npm 11
# refuses to publish a prerelease without an explicit --tag.
run: npm publish --access public --tag latest

- name: Create GitHub Release from CHANGELOG
env:
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog

## Unreleased
## 0.0.1-beta.35 (2026-10-12)

**First npm release since 0.0.1-beta.33.** The 0.0.1-beta.34 tag exists on GitHub but never reached npm (its publish was rejected — see below), so this release also ships everything listed under 0.0.1-beta.34: the Windows / Node 24+ install fix.

### Changed — releases publish via npm trusted publishing

- The release workflow now authenticates to npm with GitHub's OIDC identity instead of a stored `NPM_TOKEN`. That token had silently expired, which is why 0.0.1-beta.34 failed to publish with `E404`. Nothing to expire now; published versions also carry npm provenance.
- Releases go straight to the `latest` dist-tag (what `npm i -g @instawp/cli` and `instawp upgrade` install). The `beta` dist-tag is no longer updated and stays at 0.0.1-beta.33.

### Fixed — `local stop` left the server running when Playground ran via npx

Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ instawp --help
git tag -a v0.0.1-beta.2 -m "..." && git push origin v0.0.1-beta.2
```

- Publishes with `--tag beta` (install via `npm i -g @instawp/cli@beta`). `latest` stays on an old stable; drop `--tag beta` for stable releases. Uses `NPM_TOKEN`.
- Publishes to the `latest` dist-tag via **npm trusted publishing (OIDC)** — no `NPM_TOKEN`. The trusted publisher is configured on npmjs.com (`@instawp/cli` → Settings → Trusted Publisher: GitHub Actions, `InstaWP/cli`, `publish.yml`); renaming the workflow file breaks publishing until that is updated. OIDC cannot run `npm dist-tag`, so the `beta` dist-tag is frozen at 0.0.1-beta.33 (nothing reads it). A publish `E404 PUT` means npm rejected the credential, not a missing package.
- **`publish.yml`** (tag-triggered): Windows smoke test → build → test → npm publish → GitHub Release. **`release-notify.yml`** (also tag-triggered, unlike siblings which fire on PR-merge) → Claude summary to Slack. Both extract the CHANGELOG section by **exact** `## <version> ` header match, so the version in `package.json`, the tag, and the CHANGELOG header must all agree.
- Pushing the tag is the release trigger; pushing `main` alone publishes nothing. Tag dispatch / secret listing needs repo admin (a normal token gets 403).

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@instawp/cli",
"version": "0.0.1-beta.34",
"version": "0.0.1-beta.35",
"description": "InstaWP CLI - Create and manage WordPress sites from the terminal",
"type": "module",
"bin": {
Expand Down
Loading