Skip to content

Publish to npm via trusted publishing - #157

Merged
microbit-grace merged 2 commits into
mainfrom
npm-trusted-publishing
Sep 9, 2026
Merged

Publish to npm via trusted publishing#157
microbit-grace merged 2 commits into
mainfrom
npm-trusted-publishing

Conversation

@microbit-matt-hillsdon

Copy link
Copy Markdown
Contributor

Replaces the NPM_TOKEN secret with OIDC, following makecode-embed. The build job packs the workspace tarball and a separate publish job, with no checkout and the only id-token permission, stages it to npm from the npm-publish environment. npm stage is unaware of workspaces, but publishing the tarball from npm pack -w sidesteps that. npm pack now runs on every build so packaging problems fail a branch build rather than a release.

Also drops the packages: write permission and the GITHUB_TOKEN passed to npm ci, left over from GitHub Packages; nothing here resolves from that registry.

Replaces the NPM_TOKEN secret with OIDC, following makecode-embed. The
build job packs the workspace tarball and a separate publish job, with
no checkout and the only id-token permission, stages it to npm from the
npm-publish environment. npm stage is unaware of workspaces, but
publishing the tarball from npm pack -w sidesteps that. npm pack now
runs on every build so packaging problems fail a branch build rather
than a release.

Also drops the packages: write permission and the GITHUB_TOKEN passed to
npm ci, left over from GitHub Packages; nothing here resolves from that
registry.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 9, 2026

Copy link
Copy Markdown

Deploying microbit-connection with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8df2b03
Status: ✅  Deploy successful!
Preview URL: https://1501437b.microbit-connection.pages.dev
Branch Preview URL: https://npm-trusted-publishing.microbit-connection.pages.dev

View logs

@microbit-grace
microbit-grace merged commit 9deafd9 into main Sep 9, 2026
5 checks passed
@microbit-grace
microbit-grace deleted the npm-trusted-publishing branch September 9, 2026 12:54
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.

2 participants