From 1b6a50166b3cd5756a216a5a9d1d6a98ae58254a Mon Sep 17 00:00:00 2001 From: "Queen Vinyl Da.i'gyu-Kazotetsu" Date: Sat, 30 Apr 2022 20:46:06 -0700 Subject: [PATCH] Allow for passing in arguments to `npm publish` in publish-release --- .github/workflows/publish-release.yml | 7 ++++++- README.md | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index b05e084..484cfb3 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -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" @@ -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 }} diff --git a/README.md b/README.md index b34efc5..8239983 100644 --- a/README.md +++ b/README.md @@ -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`. + +- This `input` is optional with a default of an empty string + ### registry-url The registry to publish to.