-
Notifications
You must be signed in to change notification settings - Fork 51
ci: enhance npm publish workflow #2753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Alenar
wants to merge
6
commits into
main
Choose a base branch
from
djo/2745/ci-enhance-npm-publish
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+63
−57
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
901a0b7 to
be934c7
Compare
- rename input `package` to `package_dir`, this is mostly a semantic
change since it was already used as such
- extract the package name from the `package.json` file (this have the
additionnal advantage of retrieving the scope since it's included in
the name)
- use `working-directory: ${{ inputs.package_dir }}` instead of doing
manual `cd` where applicable
- fix console prints that were talking about `crates.io` which is
incorrect since everything is done against `npmjs.com` in this
workflow
Since it's already in the package.json name, we do not need to re-specify it so it can be removed from the ci workflows.
be934c7 to
ae85ba1
Compare
This induce repeating code but will at least ensure that something is written to the console in all cases.
jpraynaud
approved these changes
Oct 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
turmelclem
approved these changes
Oct 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Content
This PR includes several enhancements and clarifications on the npm publications github actions workflows.
publish-npm-packagecomposite workflow:packagetopackage_diras it was already used as a such, this make it clear that it's not the actual package name in the npm registry{package_dir}/package.json, this have two benifits: first this name include the scope so this allow its removal from the workflow parameters, second combined with the previous change this allow for packages that have a different directory name and published package nameactions/setup-node@v6:registry-urlof this action, it setup a project level.npmrcand set up auth to read in fromenv.NODE_AUTH_TOKEN, allowing to replace thenpm setcalls (see usage doc).promotestep: the command used,npm dist-taghave no dry-run option so this induce repeating code, but this ensure that something is output in the log in all cases (previously in 'promote' mode the workflow would stop after the "List package" job).pre-releasefrompublish-wasm-testtopublish-next-wasm-package)Pre-submit checklist
Issue(s)
Relates to #2745