Skip to content

Commit cef984a

Browse files
authored
Add ability to select publish type
1 parent 8356fe3 commit cef984a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/publish.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
name: Publish to npm
22

33
on:
4-
workflow_dispatch: ~
4+
workflow_dispatch:
5+
inputs:
6+
bump:
7+
description: 'Version bump type'
8+
required: true
9+
default: 'minor'
10+
type: choice
11+
options:
12+
- patch
13+
- minor
14+
- major
15+
516
push:
617
branches:
718
- main
@@ -40,7 +51,7 @@ jobs:
4051
run: |
4152
git config --global user.name "github-actions[bot]"
4253
git config --global user.email "github-actions[bot]@users.noreply.github.com"
43-
TAG=$(npm version minor -m "Release %s [skip ci]")
54+
TAG=$(npm version ${{ github.event.inputs.bump || 'minor' }} -m "Release %s [skip ci]")
4455
echo "Created tag: $TAG"
4556
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
4657
git push origin main --follow-tags

0 commit comments

Comments
 (0)