Skip to content

Commit c9d67b5

Browse files
committed
Added manual version bumping in the GitHub action
1 parent c38020c commit c9d67b5

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/version.yaml

+22-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@ on:
33
pull_request:
44
types: [closed]
55
branches: [master]
6+
workflow_dispatch:
7+
inputs:
8+
releaseType:
9+
description: 'What kind of release is this?'
10+
required: false
11+
default: 'auto'
12+
type: choice
13+
options:
14+
- 'auto'
15+
- 'major'
16+
- 'minor'
17+
- 'patch'
18+
- 'dev'
619

720
jobs:
821
version:
@@ -36,6 +49,14 @@ jobs:
3649
echo "release-kind=$RELEASE_KIND" >> $GITHUB_OUTPUT
3750
echo "PACKAGE=false" >> $GITHUB_ENV
3851
52+
- name: Override release kind on manual
53+
if: ${{ github.event.inputs.releaseType != 'auto' }}
54+
id: override-release-kind
55+
run: |
56+
echo "::notice::Overriding release type to ${{ github.event.inputs.releaseType }} since this was a manual trigger"
57+
echo "RELEASE_KIND=${{ github.event.inputs.releaseType }}" >> $GITHUB_ENV
58+
echo "release-kind=${{ github.event.inputs.releaseType }}" >> $GITHUB_OUTPUT
59+
3960
- name: Get Pull Request Number
4061
id: pr
4162
run: |
@@ -59,7 +80,7 @@ jobs:
5980
echo "PACKAGE=true" >> $GITHUB_ENV
6081
;;
6182
dev)
62-
echo "Intentionally not bumping version for dev release"
83+
bump-my-version bump --allow-dirty --verbose --no-commit --no-tag "$RELEASE_KIND"
6384
;;
6485
esac
6586

0 commit comments

Comments
 (0)