mollyhardman is running do-bumpversion #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bumps the patch version when main branch is changed by push or closed PR | |
name: do-bumpversion | |
run-name: ${{ github.actor }} is running do-bumpversion | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
jobs: | |
do-bumpversion: | |
if: ${{ github.event_name == 'push' || github.event.pull_request.merged == true }} | |
runs-on: "ubuntu-latest" | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: fregante/setup-git-user@v2 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniconda-version: "latest" | |
activate-environment: test | |
channels: conda-forge | |
show-channel-urls: true | |
use-only-tar-bz2: true | |
- run: | | |
conda install bumpversion | |
bumpversion --tag --message "[skip actions] bump version {current_version} -> {new_version}" patch | |
tagName=$(/usr/bin/git tag -l) | |
/usr/bin/git pull | |
/usr/bin/git push | |
/usr/bin/git push origin tag ${tagName} |