Skip to content

fix(deps): update all dependencies #634

fix(deps): update all dependencies

fix(deps): update all dependencies #634

Workflow file for this run

name: Version Bump
on:
pull_request:
types: [edited]
permissions:
contents: write
jobs:
version-bump:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Python and install dependencies
uses: actions/setup-python@v6
with:
python-version: '3.14'
cache: 'pip'
- run: pip install -r ./scripts/requirements.txt
- name: Extract PR Body
run: |
{
echo 'BODY<<EOF'
echo "${{ github.event.pull_request.body }}"
echo 'EOF'
} >> $GITHUB_ENV
- name: Determine Version Type
run: |
if echo "$BODY" | grep -q "\- \[x\] Bump \*\*major\*\* version"; then
echo "VERSION_TYPE=major" >> $GITHUB_ENV
elif echo "$BODY" | grep -q "\- \[x\] Bump \*\*minor\*\* version"; then
echo "VERSION_TYPE=minor" >> $GITHUB_ENV
elif echo "$BODY" | grep -q "\- \[x\] Bump \*\*patch\*\* version"; then
echo "VERSION_TYPE=patch" >> $GITHUB_ENV
else
echo "No valid version bump checkbox selected"
exit 0
fi
- name: Run version check script
if: env.VERSION_TYPE != ''
run: python ./scripts/version.py --bump $VERSION_TYPE
- name: Commit version bump
if: env.VERSION_TYPE != ''
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add .
if git diff --staged --quiet; then
echo "No changes detected, skipping commit."
exit 0
fi
git commit -m "chore: bump version"
# Pull latest changes before pushing to avoid non-fast-forward errors
git pull --rebase origin ${{ github.head_ref }}
git push https://x-access-token:${{ secrets.PR_PAT }}@github.com/${{ github.repository }}.git HEAD:${{ github.head_ref }}
- name: Comment on PR
if: env.VERSION_TYPE != ''
run: |
unset GH_TOKEN
gh auth login --with-token <<< "${{ secrets.PR_PAT }}"
gh pr comment ${{ github.event.pull_request.html_url }} --body "✅ Version has been bumped: **${VERSION_TYPE}**"
run-ci-workflow:
needs: [version-bump]
uses: ./.github/workflows/rust-ci.yml
secrets: inherit