name: Version bump # This repo currently only has a single long-lived branch (master), not the # development/main split described in the global workflow convention. Until # a development branch exists, every push to master bumps PATCH. on: push: branches: [master] permissions: contents: write jobs: bump: if: >- github.actor != 'github-actions[bot]' && !contains(github.event.head_commit.message, '[skip ci]') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} - name: Bump patch version run: | set -e version=$(cat VERSION) IFS='.' read -r major minor patch <<< "$version" patch=$((patch + 1)) new_version="$major.$minor.$patch" echo "$new_version" > VERSION git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add VERSION git commit -m "chore(release): v$new_version [skip ci]" git push