Skip to content

Commit

Permalink
refactor(release-python-package)🔧: Replace bumpversion with bump2vers…
Browse files Browse the repository at this point in the history
…ion in GitHub Actions workflow

- Change the tool installation from bumpversion to bump2version.
- Update all references of bumpversion to bump2version in the workflow commands.
  • Loading branch information
ericmjl committed Dec 20, 2024
1 parent 6af34ac commit 7c96f91
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release-python-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ jobs:

- name: Set up Python
run: |
uv tool install bumpversion
uv tool install bump2version
- name: Set version name
run: echo "VERSION_NAME=${{ github.event.inputs.version_name || env.DEFAULT_VERSION_NAME }}" >> $GITHUB_ENV

- name: Dry run bumpversion
- name: Dry run bump2version
run: |
bumpversion --dry-run ${{ env.VERSION_NAME }} --allow-dirty --verbose
bump2version --dry-run ${{ env.VERSION_NAME }} --allow-dirty --verbose
- name: Store new version number
run: echo "version_number=`bumpversion --dry-run --list ${{ env.VERSION_NAME }} | grep new_version | sed -r s,"^.*=",,`" >> $GITHUB_ENV
run: echo "version_number=`bump2version --dry-run --list ${{ env.VERSION_NAME }} | grep new_version | sed -r s,"^.*=",,`" >> $GITHUB_ENV

- name: Display new version number
run: |
Expand All @@ -77,8 +77,8 @@ jobs:
git config user.name github-actions
git config user.email [email protected]
- name: Run bumpversion
run: bumpversion ${{ env.VERSION_NAME }} --verbose
- name: Run bump2version
run: bump2version ${{ env.VERSION_NAME }} --verbose

- name: Ensure tag creation
run: git tag | grep ${{ env.version_number }}
Expand Down

0 comments on commit 7c96f91

Please sign in to comment.