Bump Version #4
This file contains hidden or 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: | |
| bump: | |
| description: 'Version bump type' | |
| required: true | |
| default: 'patch' | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| jobs: | |
| bump-version: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: true | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Bump version | |
| run: python bump_version.py ${{ github.event.inputs.bump }} | |
| - name: Read bumped version | |
| id: version | |
| run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT | |
| - name: Commit updated version files | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add VERSION backend/pyproject.toml frontend/package.json | |
| git commit -m "chore(release): bump version to ${{ steps.version.outputs.version }}" | |
| git push | |
| - name: Create and push Git tag | |
| run: | | |
| git tag v${{ steps.version.outputs.version }} | |
| git push origin v${{ steps.version.outputs.version }} |