Bump version #4
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
name: Bump version | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Semver type of new version (major / minor / patch)' | |
required: true | |
type: choice | |
options: | |
- micro | |
- minor | |
- major | |
permissions: | |
contents: write | |
jobs: | |
bump-version: | |
name: bump version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pdm-project/setup-pdm@v3 | |
- name: Install pdm-bump | |
run: pdm self add pdm-bump | |
- name: Setup Git | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}-noreply@github.com" | |
- name: Bump version | |
run: pdm bump ${{ github.event.inputs.version }} | |
- name: Update code | |
run: | | |
git add pyproject.toml | |
git commit -m "bump up ${{ github.event.inputs.version }} version from workflow" | |
git push | |