Skip to content

Update specifiers & log format #31

Update specifiers & log format

Update specifiers & log format #31

Workflow file for this run

name: PR - Merge
on:
pull_request:
types:
- closed
jobs:
version:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write # To push the version bump back to the repo
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Bump version
run: |
make install-uv
commit_log=$(mktemp)
git log --quiet HEAD^..HEAD > $commit_log
update_level=$(grep -Fq '[major]' $commit_log && echo 'major' || \
grep -Fq '[minor]' $commit_log && echo 'minor' || \
grep -Fq '[patch]' $commit_log && echo 'patch' || \
echo "none")
echo "Update level is $update_level"
update_log=$(mktemp)
./version_bump.sh $update_level 2>&1 | tee $update_log
if ! git diff-files --quiet; then
git add -A .
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git commit -am "Version bump $(tail -n1 $update_log)"
git push
fi