chore(main): release 0.7.1 #224
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
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: ["Code Quality"] | |
| types: | |
| - completed | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| name: Release tag | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' | |
| steps: | |
| - uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} | |
| release-type: python | |
| - uses: actions/checkout@v4 | |
| if: ${{ steps.release.outputs.release_created }} | |
| with: | |
| fetch-depth: 0 | |
| ref: main | |
| - name: Install uv | |
| if: ${{ steps.release.outputs.release_created }} | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Configure Git | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| - name: Update lock file | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: uv lock | |
| - name: Update balatrobot.json version | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: | | |
| # Update version in balatrobot.json | |
| jq --arg version "${{ steps.release.outputs.version }}" '.version = $version' balatrobot.json > balatrobot.json.tmp | |
| mv balatrobot.json.tmp balatrobot.json | |
| - name: Commit and push updated lock file | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: | | |
| if [[ -n $(git status --porcelain uv.lock) ]]; then | |
| git add uv.lock | |
| git commit -m "chore(deps): update uv.lock for version ${{ steps.release.outputs.version }}" | |
| git push | |
| else | |
| echo "No changes to uv.lock" | |
| fi | |
| - name: Commit and push updated balatrobot.json | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: | | |
| if [[ -n $(git status --porcelain balatrobot.json) ]]; then | |
| git add balatrobot.json | |
| git commit -m "chore(release): update balatrobot.json version to ${{ steps.release.outputs.version }}" | |
| git push | |
| else | |
| echo "No changes to balatrobot.json" | |
| fi |