-
-
Notifications
You must be signed in to change notification settings - Fork 20
48 lines (41 loc) · 1.49 KB
/
release-please.yaml
File metadata and controls
48 lines (41 loc) · 1.49 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
42
43
44
45
46
47
48
name: "Release Please"
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
wait-for-previous-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Wait for Previous Release PR to be Tagged
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Checking for pending release PR..."
while true; do
PENDING_PR=$(gh pr list --repo ${{ github.repository }} --state closed --base master --json number,labels --jq '.[] | select(.labels | any(.name == "autorelease: pending")) | .number')
if [[ -z "$PENDING_PR" ]]; then
echo "No pending release PR found. Proceeding..."
break
fi
echo "Previous release PR #$PENDING_PR is still pending. Waiting for it to be tagged..."
sleep 300 # Wait 5 minutes before checking again
done
release-please:
needs: wait-for-previous-release
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
id: release
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: .github/release-please-config.json
manifest-file: .github/.release-please-manifest.json
skip-github-release: true
target-branch: master