Skip to content
Merged
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
18 changes: 12 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish
name: Stage

on:
push:
Expand Down Expand Up @@ -30,11 +30,14 @@ jobs:
with:
node-version: 24

- name: Setup npm with staged publishing
run: npm install --global npm@11.21.0

- name: Build NPM
run: deno task build:npm ${{steps.vars.outputs.version}}

- name: dry run publish
run: npm publish --dry-run --access=public --tag=verify
- name: dry run staged publish
run: npm stage publish --dry-run --access=public --tag=verify

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, does --dry-run work on staged?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I was wondering the same thing, so I ran it locally :)

working-directory: ./build/npm

- name: upload build
Expand All @@ -43,7 +46,7 @@ jobs:
name: npm-build
path: ./build/npm

publish-npm:
stage-npm:
needs: verify-npm
runs-on: ubuntu-latest

Expand All @@ -53,12 +56,15 @@ jobs:
with:
node-version: 24

- name: Setup npm with staged publishing
run: npm install --global npm@11.21.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does actions/setup-node not give us an appropriate version of npm? I would presume it works? Or is staged publishing only on newer versions of npm?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol. great minds @jbolda, great minds.....

I also thought that was weird to have to burn a step just configuring npm, but it turns out that the answer is "ignore community requests" 🤷🏻‍♂️

actions/setup-node#529

@cowboyd cowboyd Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, upgrading to the default Node26 container gets you npm 11.19.1 which isn't there yet.


- name: download build
uses: actions/download-artifact@v4
with:
name: npm-build
path: ./build/npm

- name: Publish NPM
run: npm publish --access=public --tag=latest
- name: Stage NPM publish
run: npm stage publish --access=public --tag=latest
working-directory: ./build/npm
Loading