Skip to content

Commit

Permalink
enhance(publish-release): allow manual run + force npm publish (#1770)
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner authored Apr 8, 2024
1 parent 403a553 commit 8ef440c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
branches:
- main

workflow_dispatch:
inputs:
force-npm-publish:
description: "Force npm publish"
type: boolean

permissions:
contents: write
pull-requests: write
Expand All @@ -19,21 +25,21 @@ jobs:
id: release

- name: Setup
if: steps.release.outputs.release_created
if: ${{ github.event.inputs.force-npm-publish || steps.release.outputs.release_created }}
uses: actions/checkout@v4

- name: Checkout
if: steps.release.outputs.release_created
if: ${{ github.event.inputs.force-npm-publish || steps.release.outputs.release_created }}
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: Install
if: steps.release.outputs.release_created
if: ${{ github.event.inputs.force-npm-publish || steps.release.outputs.release_created }}
run: npm ci

- name: Publish
if: steps.release.outputs.release_created
if: ${{ github.event.inputs.force-npm-publish || steps.release.outputs.release_created }}
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 comments on commit 8ef440c

Please sign in to comment.