Skip to content

Commit

Permalink
chore: add manual release override
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored Mar 15, 2024
1 parent 8e726a1 commit 8f1ce93
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
push:
branches:
- main
workflow_dispatch:
inputs:
publish:
description: Publish to NPM
required: true
default: false
type: boolean

permissions:
contents: read
Expand All @@ -30,25 +37,25 @@ jobs:

# Publish to NPM on new releases
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created || github.event.inputs.publish == 'true' }}
- uses: pnpm/action-setup@v2
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created || github.event.inputs.publish == 'true' }}
- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created || github.event.inputs.publish == 'true' }}
with:
cache: pnpm
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
- run: corepack enable && pnpm --version && pnpm install
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created || github.event.inputs.publish == 'true' }}
- name: Set publishing config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created || github.event.inputs.publish == 'true' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
# Release Please has already incremented versions and published tags, so we just
# need to publish the new version to npm here
- run: pnpm publish
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created || github.event.inputs.publish == 'true' }}
env:
NPM_CONFIG_PROVENANCE: true

0 comments on commit 8f1ce93

Please sign in to comment.