Skip to content

Commit 7c3bd4d

Browse files
authored
ci(release): add manual publish trigger (#85)
Add workflow_dispatch with publish_only option to manually trigger npm publish without waiting for release-please to create a release. Also add NODE_AUTH_TOKEN for npm publish.
1 parent cd8ba57 commit 7c3bd4d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/release-please.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
8+
inputs:
9+
publish_only:
10+
description: 'Skip release-please and publish directly'
11+
required: false
12+
default: false
13+
type: boolean
714

815
concurrency:
916
group: ${{ github.workflow }}-${{ github.ref }}
@@ -19,6 +26,7 @@ env:
1926

2027
jobs:
2128
release-please:
29+
if: ${{ !inputs.publish_only }}
2230
runs-on: [self-hosted, linux, x64, ubuntu-2404, aws]
2331
outputs:
2432
releases_created: ${{ steps.release.outputs.releases_created }}
@@ -40,7 +48,7 @@ jobs:
4048

4149
publish:
4250
needs: release-please
43-
if: ${{ needs.release-please.outputs.release_created == 'true' }}
51+
if: ${{ always() && (needs.release-please.outputs.release_created == 'true' || inputs.publish_only) }}
4452
runs-on: ubuntu-latest
4553
permissions:
4654
contents: read

0 commit comments

Comments
 (0)