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
Tests should only run when sources, tests, or workflows are changed.
  • Loading branch information
acederberg committed Aug 21, 2024
1 parent 5882716 commit aba0b07
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/pr_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches:
- master
- develop
paths:
- ./src/**
- ./tests/**
- ./docker/**

pull_request:
branches:
- master
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@ 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: alpha
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
- beta

tag_message:
required: true
description: |
Expand Down Expand Up @@ -60,10 +62,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 aba0b07

Please sign in to comment.