Skip to content

Commit

Permalink
Added manual version bumping in the GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
coordt committed Mar 16, 2024
1 parent c38020c commit c9d67b5
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@ on:
pull_request:
types: [closed]
branches: [master]
workflow_dispatch:
inputs:
releaseType:
description: 'What kind of release is this?'
required: false
default: 'auto'
type: choice
options:
- 'auto'
- 'major'
- 'minor'
- 'patch'
- 'dev'

jobs:
version:
Expand Down Expand Up @@ -36,6 +49,14 @@ jobs:
echo "release-kind=$RELEASE_KIND" >> $GITHUB_OUTPUT
echo "PACKAGE=false" >> $GITHUB_ENV
- name: Override release kind on manual
if: ${{ github.event.inputs.releaseType != 'auto' }}
id: override-release-kind
run: |
echo "::notice::Overriding release type to ${{ github.event.inputs.releaseType }} since this was a manual trigger"
echo "RELEASE_KIND=${{ github.event.inputs.releaseType }}" >> $GITHUB_ENV
echo "release-kind=${{ github.event.inputs.releaseType }}" >> $GITHUB_OUTPUT
- name: Get Pull Request Number
id: pr
run: |
Expand All @@ -59,7 +80,7 @@ jobs:
echo "PACKAGE=true" >> $GITHUB_ENV
;;
dev)
echo "Intentionally not bumping version for dev release"
bump-my-version bump --allow-dirty --verbose --no-commit --no-tag "$RELEASE_KIND"
;;
esac
Expand Down

0 comments on commit c9d67b5

Please sign in to comment.