Skip to content

Commit fda8c48

Browse files
committed
ci: allows a workflow to create a release
1 parent c03881b commit fda8c48

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: Publish
33
on:
44
release:
55
types: [created]
6+
workflow_dispatch:
7+
inputs:
8+
tag_name:
9+
description: 'Tag name for the release'
10+
required: true
11+
type: string
612

713
permissions:
814
contents: read
@@ -22,7 +28,7 @@ jobs:
2228
- run: npm run test
2329
- run: npm version ${TAG_NAME} --git-tag-version=false
2430
env:
25-
TAG_NAME: ${{ github.event.release.tag_name }}
31+
TAG_NAME: ${{ github.event.release.tag_name || github.event.inputs.tag_name }}
2632
- run: npm whoami; npm --ignore-scripts publish --provenance
2733
env:
2834
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)