Updated dependency from Pydantic 1 to 2. #33
Workflow file for this run
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: Auto-bump the version | |
on: | |
pull_request: | |
types: [closed] | |
branches: [master] | |
workflow_dispatch: | |
inputs: | |
dry_run: | |
description: Don't actually do the work, just describe it | |
default: true | |
type: boolean | |
new_version: | |
description: Set the version to a specific value | |
required: false | |
type: string | |
verbose: | |
description: The amount of output detail | |
default: 0 | |
type: choice | |
options: | |
- "0" | |
- "1" | |
- "2" | |
jobs: | |
bumpversion: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PAT }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' # caching pip dependencies | |
- name: Install requirements | |
run: | | |
python -m pip install generate-changelog | |
python -m pip install -e . | |
- name: Git check | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Testing Git" | |
git --version | |
git config --list | |
- name: Generate the changelog and get the release hint | |
id: generate-changelog | |
run: | | |
RELEASE_KIND=$(generate-changelog --output release-hint) | |
echo "::notice::Suggested release type is: ${RELEASE_KIND}" | |
echo "RELEASE_KIND=$RELEASE_KIND" >> $GITHUB_ENV | |
echo "release-kind=$RELEASE_KIND" >> $GITHUB_OUTPUT | |
- name: Bump Version auto | |
if: ${{ github.event_name != 'workflow_dispatch' }} | |
shell: bash | |
run: | | |
if [[ $RELEASE_KIND != "no-release" ]]; then | |
bump-my-version -v "$RELEASE_KIND" | |
git push | |
git push --tags | |
fi | |
- name: Bump Version manual | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
shell: bash | |
env: | |
BUMPVERSION_DRY_RUN: ${{ inputs.dry_run }} | |
BUMPVERSION_NEW_VERSION: ${{ inputs.tags }} | |
BUMPVERSION_VERBOSE: ${{ inputs.verbose }} | |
run: | | |
bump-my-version -v "$RELEASE_KIND" | |
if [[ BUMPVERSION_DRY_RUN == "false" ]]; then | |
git push | |
git push --tags | |
fi |