Skip to content

ci: publish packages via nx release and npm trusted publishing - #288

Open
ChristopherPHolder wants to merge 2 commits into
mainfrom
fix-release-publishing
Open

ChristopherPHolder wants to merge 2 commits into
mainfrom
fix-release-publishing

Conversation

@ChristopherPHolder

@ChristopherPHolder ChristopherPHolder commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The release workflow has been failing since npm revoked classic tokens: our NPM_TOKEN (from 2022) no longer works. cli-0.21.2, cli-0.21.3 and nx-plugin-0.1.5 were tagged on GitHub but never reached npm (npm still has @push-based/user-flow@0.21.1 and @push-based/user-flow-nx-plugin@0.1.4).

What

Follows the PushBased package publishing setup (same as zod2nx-schema):

  • nx release replaces @jscutlery/semver + ngx-deploy-npm
    • independent versioning for cli and nx-plugin
    • keeps the existing {projectName}-{version} tag pattern, so versions resolve from current tags
    • conventional commits → bump, project CHANGELOG.md + GitHub release
  • release.yml (push to main): build, test, then nx release --skip-publish as the PushBased bot app (commits, tags, pushes, creates GitHub releases)
  • publish.yml (on cli-* / nx-plugin-* tags, or manual): nx release publish via npm trusted publishing (OIDC). No npm token. Runs on Node 24 because OIDC needs npm ≥ 11.5.1. Versions already on npm are skipped.
  • Added repository to the nx-plugin package.json (npm provenance requires it)
  • Removed the root version/github targets and the @jscutlery/semver / ngx-deploy-npm deps

Dry-run with #287's fix: commit on top: cli → 0.21.4, nx-plugin → 0.1.6 (dependent bump). The first publish also catches up nx-plugin.

Required repo / npm setup before merging

  • Install the PushBased bot GitHub app on this repo
  • Create the release environment with variable GH_APP_ID=2781189 and secret GH_APP_PRIVATE_KEY
  • npmjs.com → trusted publisher for both @push-based/user-flow and @push-based/user-flow-nx-plugin: org push-based, repo user-flow, workflow publish.yml, environment release
  • After the first successful publish: delete the NPM_TOKEN repo secret

npm revoked the classic NPM_TOKEN, so cli 0.21.2/0.21.3 and nx-plugin 0.1.5
were tagged but never published. Replace @jscutlery/semver + ngx-deploy-npm
with nx release (independent versioning, existing {projectName}-{version} tags)
and split release/publish workflows: release versions, tags and creates GitHub
releases as the PushBased bot app; publish runs on the pushed tags and
publishes to npm via OIDC trusted publishing from the release environment.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

The cli-e2e global setup publishes the cli to verdaccio via the
cli:publish target and tools/scripts/publish.mjs.
@github-actions

Copy link
Copy Markdown

❗❗❗ report generated by this PR ❗❗❗

☕ Order Coffee ☕

Date/Time: 2026-10-21 18:54

Step Name Gather Mode Performance Accessibility Best Practices Seo
🧭 Navigate to coffee cart navigation 88 93 100 83
☕ Select coffee timespan 18/18 - 8/8 -
✔ Coffee selected snapshot Ø 1/1 16/18 4/4 3/5
🛒 Checkout order timespan 19/19 - 8/8 -
🧾 Order checked out snapshot Ø 1/1 18/19 4/4 3/5
💌 Submit order timespan 18/18 - 8/8 -
📧 Order submitted snapshot Ø 1/1 20/22 4/4 3/5
🧭 Navigate to github navigation 100 92 100 83

@github-actions

Copy link
Copy Markdown

☕ Order Coffee ☕

Date/Time: 2026-10-21 18:54

Step Name Gather Mode Performance Accessibility Best Practices Seo
🧭 Navigate to coffee cart navigation 99 95 100 83
☕ Select coffee timespan 10/10 - 8/8 -
✔ Coffee selected snapshot Ø 4/4 17/18 6/6 3/5
🛒 Checkout order timespan 12/12 - 8/8 -
🧾 Order checked out snapshot Ø 4/4 18/19 6/6 3/5
💌 Submit order timespan 11/11 - 8/8 -
📧 Order submitted snapshot Ø 4/4 21/22 6/6 3/5
🧭 Navigate to github navigation 99 95 100 83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant