NPM Authentication
Publish packages to npm registry or GitHub Packages
- uses: a-line-services/release-pilot@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
npm-token: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN secret in your repoIf you need more control over npm configuration:
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- uses: a-line-services/release-pilot@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
To publish to GitHub Packages instead of npm:
- uses: a-line-services/release-pilot@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
npm-token: ${{ secrets.GITHUB_TOKEN }}
npm-registry: 'https://npm.pkg.github.com'
package.json must have the correct scope:
{
"name": "@your-org/your-package",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}
For private npm registries (Verdaccio, Artifactory, etc.):
- uses: a-line-services/release-pilot@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
npm-token: ${{ secrets.PRIVATE_NPM_TOKEN }}
npm-registry: 'https://npm.your-company.com'
| Input | Description | Default |
|---|---|---|
npm-token |
NPM authentication token | - |
npm-registry |
NPM registry URL | https://registry.npmjs.org |