Publishes a NodeJS package to an npm registry.
The action can be placed right after checking out the source code:
steps:
- uses: actions/checkout@v4
- uses: giancosta86/aurora-github/actions/publish-npm-package@v5
with:
npm-token: ${{ secrets.NPM_TOKEN }}
Please, note: this action is designed for publication only - not for verification: you may want use verify-npm-package for that; as a plus, you can add publication-specific checks via the pre-/post- hook scripts of your package.json
file.
Please, note: this action is automatically run by publish-rust-wasm.
-
The project's package manager must be pnpm - version
9
or later compatible. -
The requirements for setup-nodejs-context.
-
Before the first publication, running with
dry-run
set to true is recommended.
Name | Type | Description | Default value |
---|---|---|---|
dry-run |
boolean | Run a simulated publication via --dry-run |
false |
npm-token |
string | The secret token for publishing to the registry | |
registry-url |
string | The URL of the npm registry | Official npm registry |
frozen-lockfile |
boolean | Fail if pnpm-lock.yaml is missing or outdated |
true |
project-directory |
string | The directory containing package.json |
. |
shell |
string | The shell used to run commands | bash |