Skip to content
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

Allow for passing in arguments to npm publish in publish-release #35

Merged
merged 1 commit into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
default: true
required: false
type: boolean
npm-publish-args:
description: Arguments passed to `npm publish` command; ignored if "npm-publish" is false
default: ""
required: false
type: string
registry-url:
description: The registry to publish to
default: "https://registry.npmjs.org"
Expand Down Expand Up @@ -54,7 +59,7 @@ jobs:
if: ${{ steps.release.outputs.release_created }}
- run: yarn install --frozen-lockfile
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
- run: npm publish ${{ inputs.npm-publish-args }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
if: ${{ steps.release.outputs.release_created }}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ The version of Node.js to use for the release. This action supports all [active
Whether to publish the package to the NPM registry.

- This `input` is optional with a default of `true`

### npm-publish-args

Arguments to pass to the `npm publish` command. This is ignored if `npm-publish` is set to `false`.
schalkneethling marked this conversation as resolved.
Show resolved Hide resolved

- This `input` is optional with a default of an empty string

### registry-url

The registry to publish to.
Expand Down