Skip to content

Commit

Permalink
Method of only bumping client
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-riggs committed Sep 9, 2024
1 parent 71fb08f commit 1170e85
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .bumpclient.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[tool.bumpversion]
current_version = "0.13.1"
commit = true
tag = false

[[tool.bumpversion.files]]
filename = "src/murfey/__init__.py"
search = '__supported_client_version__ = "{current_version}"'
replace = '__supported_client_version__ = "{new_version}"'
15 changes: 12 additions & 3 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ on:
workflow_dispatch:
inputs:
bumpLevel:
description: "Kind of version bump"
description: "Kind of version bump for project"
required: true
default: "patch"
type: choice
options:
- major
- minor
- patch
- none
bumpClient:
description: "Bump supported client?"
required: true
type: boolean
newClientVersion:
description: "Version of new client (needed to bump supported client)"
required: false
type: string

permissions:
contents: read
Expand Down Expand Up @@ -51,8 +56,10 @@ jobs:
git checkout -b version-bump
if [ ${{ inputs.clientBump } = true ]; then
bump-my-version bump ${{ inputs.bumpLevel }} src/murfey/__init__.py --search '__supported_client_version__ = "{current_version}"' --replace '__supported_client_version__ = "{new_version}"'
else
bump-my-version bump --config-file .bumpclient.toml --new-version ${{ inputs.newClientVersion }}
fi
if [&& ${{ inputs.bumpLevel }} != "none" ]
bump-my-version bump ${{ inputs.bumpLevel }}
fi
Expand All @@ -61,6 +68,8 @@ jobs:
gh pr create -B main -H version-bump -t "Version update (${{ inputs.bumpLevel }})" -b "
This is an automated pull request to update the version.
Does this bump the client version? ${{ inputs.bumpClient }}
After merging this, the \`Publish version\` action will tag this release and publish to pypi.
"
echo

0 comments on commit 1170e85

Please sign in to comment.