Skip to content

Commit b21e2b7

Browse files
committed
Add input to increment version
1 parent 0616b9e commit b21e2b7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@ name: publish
2323
on:
2424
# Allow the workflow to be manually run:
2525
workflow_dispatch:
26+
# Workflow inputs:
27+
inputs:
28+
version:
29+
description: 'Version Increment'
30+
type: choice
31+
default: 'none'
32+
options:
33+
- 'none'
34+
- 'major'
35+
- 'minor'
36+
- 'patch'
37+
- 'premajor'
38+
- 'preminor'
39+
- 'prepatch'
40+
- 'prerelease'
2641

2742
# Workflow jobs:
2843
jobs:
@@ -54,6 +69,12 @@ jobs:
5469
node-version: 16
5570
timeout-minutes: 5
5671

72+
# Increment package version (if requested):
73+
- name: 'Increment package version (if requested)'
74+
if: ${{ github.event.inputs.version != 'none' }}
75+
run: |
76+
npm version ${{ github.event.inputs.version }}
77+
5778
# Replace GitHub links to individual packages with npm links:
5879
- name: 'Replace all GitHub links to individual packages with npm links'
5980
run: |

0 commit comments

Comments
 (0)