Skip to content

add CI script to publish to npm#2927

Open
k-yle wants to merge 1 commit intoosmlab:gh-pagesfrom
k-yle:kh/npm
Open

add CI script to publish to npm#2927
k-yle wants to merge 1 commit intoosmlab:gh-pagesfrom
k-yle:kh/npm

Conversation

@k-yle
Copy link
Copy Markdown
Member

@k-yle k-yle commented Mar 30, 2026

Based on the recent discussions, it sounds like everyone supports the idea of publishing releases.

So, now that #2917 is merged, this PR adds a button to the GitHub UI, which a maintainer can click to publish a new version to npm:

image

There's no authentication tokens required, and this runs completely in the CI, maintainers don't need to run any commands locally.


Before this can be merged, there are a few extra steps that a maintainer needs to take (click to expand)
  1. Go to /settings/environments/new, and create new environment called npm. Setup whatever restrictions you want, like only allowing deployments from the gh-pages branch.
  2. Open the existing npm package on the npm website, click on Settings, and configure the following options:
Untitled

Once these two steps are done, publishing will work from the GitHub CI without needing to setup any other authentication or permissions. (thanks to the 'trusted publishing' feature)

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