Release: Please #8
Workflow file for this run
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
| # Runs release-please to create/update a PR with version bump and changelog. | |
| # Triggered automatically by step 1 (cut) or step 3 (cherry-pick). | |
| name: "Release: Please" | |
| on: | |
| push: | |
| branches: | |
| - release/candidate | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release-please: | |
| # Skip if this is a release-please PR merge (handled by Release: Finalize) | |
| if: "!startsWith(github.event.head_commit.message, 'chore(release')" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check if release/candidate still exists | |
| id: check | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| if gh api repos/${{ github.repository }}/branches/release/candidate --silent 2>/dev/null; then | |
| echo "exists=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "release/candidate branch no longer exists, skipping" | |
| echo "exists=false" >> $GITHUB_OUTPUT | |
| fi | |
| - uses: actions/checkout@v4 | |
| if: steps.check.outputs.exists == 'true' | |
| with: | |
| ref: release/candidate | |
| - uses: googleapis/release-please-action@v4 | |
| if: steps.check.outputs.exists == 'true' | |
| with: | |
| token: ${{ secrets.RELEASE_PAT }} | |
| config-file: .github/release-please-config.json | |
| manifest-file: .github/.release-please-manifest.json | |
| target-branch: release/candidate |