phucbm/Publish NPM Package on Release
Automatically build, test, and publish NPM packages when a GitHub release is published
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Apr 28, 2026
- License
- MIT
Pinned Snippet
uses: phucbm/publish-npm-action@0e5a33a36111a370d6c7e85f4467580f5222de46 # v1.0.16tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| npm-token | NPM authentication token. Leave empty to use OIDC trusted publishing instead. | no | "" |
| github-token | GitHub token for repository access | no | ${{ github.token }} |
| node-version | Node.js version to use | no | 20 |
| pnpm-version | PNPM version to use | no | 8 |
| build-command | Build command to run | no | pnpm build |
| install-command | Install command to run | no | pnpm install --no-frozen-lockfile |
| test-command | Test command to run | no | pnpm test |
| publish-access | NPM publish access level | no | public |
| skip-tests | Skip running tests even if test script exists | no | false |
| output-dir | Output directory for built files (e.g., dist, build, lib) | no | dist/ |
| target-branch | Branch to push updated files to | no | main |
| commit-files | Additional files/patterns to commit (space-separated) | no | "" |
Outputs
| name | description |
|---|---|
| package-name | Name of the published package |
| version | Version that was published |
| npm-url | NPM package URL |
| tests-run | Whether tests were executed |