Refactor BPMN handling for consistency and parsing improvements #4
Workflow file for this run
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 the version on merge | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: [main] | |
| jobs: | |
| bump-version: | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.merged == true | |
| permissions: | |
| contents: write | |
| outputs: | |
| build_package: ${{ steps.bump-version.outputs.build_package }} | |
| tag_name: ${{ steps.bump-version.outputs.tag_name }} | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Setup Git | |
| uses: fregante/setup-git-user@v2 | |
| - name: Install requirements | |
| run: | | |
| python -m pip install bump-my-version | |
| - name: Generate changelog and release hint | |
| id: changelog | |
| uses: docker://ghcr.io/callowayproject/generate-changelog:v0 | |
| - name: Bump version | |
| id: bump-version | |
| shell: bash | |
| run: | | |
| PR_NUMBER=$(gh pr view --json number -q .number || echo "") | |
| REVISION=$(git describe --tags --long | awk -F- '{print $2}') | |
| RELEASE_KIND=${{ steps.changelog.outputs.release_hint }} | |
| export PR_NUMBER REVISION RELEASE_KIND | |
| case "$RELEASE_KIND" in | |
| major|minor|patch) | |
| bump-my-version bump --allow-dirty --verbose "$RELEASE_KIND" | |
| git push | |
| git push --tags | |
| echo "tag_name=$(bump-my-version show current_version)" >> $GITHUB_OUTPUT | |
| echo "build_package=true" >> $GITHUB_OUTPUT | |
| ;; | |
| *) | |
| echo "build_package=false" >> $GITHUB_OUTPUT | |
| ;; | |
| esac | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| call-build-python: | |
| needs: bump-version | |
| if: ${{ needs.bump-version.outputs.build_package == 'true' }} | |
| permissions: | |
| contents: write | |
| attestations: write | |
| id-token: write | |
| packages: write | |
| uses: ./.github/workflows/build-python.yaml | |
| with: | |
| ref: ${{ needs.bump-version.outputs.tag_name }} |