Release v0.0.1 #1
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: Auto Bump Version on PR to Release | |
| on: | |
| pull_request: | |
| branches: | |
| - release | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| bump-version: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Get commit messages | |
| id: get_commits | |
| run: | | |
| echo "COMMITS=$(git log origin/${{ github.base_ref }}..HEAD --pretty=format:%s | tr '\n' ' ')" >> $GITHUB_ENV | |
| - name: Bump version | |
| run: python .github/scripts/bump_version.py "$COMMITS" | |
| - name: Commit version bump (if changed) | |
| run: | | |
| if git diff --quiet; then | |
| echo "No version change — skipping commit." | |
| else | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| git commit -am "ci: auto-bump version" | |
| git push |