-
Notifications
You must be signed in to change notification settings - Fork 3.3k
41 lines (36 loc) · 1.32 KB
/
release-please.yml
File metadata and controls
41 lines (36 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Runs release-please to create/update a PR with version bump and changelog.
# Triggered only by workflow_dispatch (from release-cut.yml).
# Does NOT auto-run on push to preserve manual changelog edits after cherry-picks.
name: "Release: Please"
on:
# Only run via workflow_dispatch (triggered by release-cut.yml)
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
release-please:
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@v6
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