https://github.com/cucumber/action-publish-npm
GitHub Action to publish an NPM module
https://github.com/cucumber/action-publish-npm
github-actions javascript polyglot-release
Last synced: about 1 year ago
JSON representation
GitHub Action to publish an NPM module
- Host: GitHub
- URL: https://github.com/cucumber/action-publish-npm
- Owner: cucumber
- License: mit
- Created: 2021-09-22T04:09:35.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-11T16:07:38.000Z (over 1 year ago)
- Last Synced: 2025-03-15T01:22:15.620Z (about 1 year ago)
- Topics: github-actions, javascript, polyglot-release
- Homepage:
- Size: 52.7 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/cucumber/action-publish-npm/actions/workflows/test.yaml)
# action-publish-npm
Publishes an NPM module to https://npmjs.com
Needs Node to be installed first.
## Inputs
* `npm-token`
* `working-directory` (optional, default `.`)
* `npm-tag` (optional, default `latest`)
## Example
```yaml
name: Publish
on:
push:
branches:
- "release/*"
jobs:
publish-ui:
name: Publish UI package to NPM
runs-on: ubuntu-latest
environment: Release
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: packages/ui/package-lock.json
- uses: cucumber/action-publish-npm@v1.0.0
with:
npm-token: ${{ secrets.NPM_TOKEN }}
working-directory: "packages/ui"
```