Skip to content

Commit

Permalink
fix(package): Added option to only bump semver tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
acederberg committed Aug 21, 2024
1 parent 5882716 commit f08c9f7
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ on:
kind:
default: patch
required: true
description: Segment of the version to increment.
description: |
Segment of the version to increment. A value of `tag` indicates
that only the tag should be updated.
options:
- tag
- patch
- minor
- major

kind_tag:
default: final
default: tag
required: true
description: |
Tag of the new version. Cannot go backwards, ordered like
``final > alpha > beta``. ``final`` indicates no tag.
``final > beta > alpha``. ``final`` indicates no tag.
options:
- final
- alpha
Expand Down Expand Up @@ -60,10 +63,18 @@ jobs:
git config user.name "github-actions"
git config user.email "<>"
python -m bumpver update "--${{ github.event.inputs.kind }}" \
--tag "${{ github.event.inputs.kind_tag }}" \
--tag-message "${{ github.event.inputs.tag_message }}" \
--commit
if [[ "${{ github.event.inputs.kind}}" == "tag" ]];
then
python -m bumpver update \
--tag "${{ github.event.inputs.kind_tag }}" \
--tag-message "${{ github.event.inputs.tag_message }}" \
--commit
else
python -m bumpver update "--${{ github.event.inputs.kind }}" \
--tag "${{ github.event.inputs.kind_tag }}" \
--tag-message "${{ github.event.inputs.tag_message }}" \
--commit
fi
echo "CAPTURA_VERSION=$( python -m bumpver --version )" >> $GITHUB_ENV
Expand Down

0 comments on commit f08c9f7

Please sign in to comment.