Repository navigation
72 lines (66 loc) · 2.63 KB
/
Copy pathrelease-prerelease.yml
File metadata and controls
72 lines (66 loc) · 2.63 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: release-please (dev / prerelease)
# Manual-only trigger. We deliberately do NOT auto-fire on `push: dev`:
# - dev sees many commits per day; auto-firing would update the Prerelease
# PR constantly and create noise on the PR feed.
# - rc cuts are explicit decisions, not background activity. Triggering this
# workflow manually IS the "cut an rc" action.
#
# Flow:
# 1. Features land on dev as usual.
# 2. When ready to cut an rc, run this workflow via `gh workflow run`.
# 3. release-please opens (or updates) a Prerelease PR titled
# `chore(dev): release X.Y.Z-rc[.N]`.
# 4. Review + merge the PR.
# 5. The publish chain runs via release.yml's workflow_dispatch escape
# hatch (see .claude/skills/release/SKILL.md → `Prerelease (rc)`).
on:
workflow_dispatch:
concurrency:
group: release-prerelease
cancel-in-progress: false
permissions:
contents: write
pull-requests: write
issues: write
jobs:
release-please:
runs-on: ubuntu-latest
timeout-minutes: 5
environment: release-app
outputs:
pr: ${{ steps.release.outputs.pr }}
steps:
# App-authenticated token: required for the Prerelease PR's commits to
# satisfy `dev`'s signed-commits + Quality-check rules (same secrets
# as the stable flow).
- name: Mint App token
id: app
uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0
with:
app-id: ${{ secrets.RELEASE_PLEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_PLEASE_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
permission-issues: write
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
id: release
with:
config-file: .github/release-please-prerelease-config.json
manifest-file: .release-please-prerelease-manifest.json
# Pin to dev. Without this, release-please-action defaults to the
# repo's default branch (also `dev` today, but make it explicit so
# the workflow keeps working if the default changes).
target-branch: dev
# Tags and releases come from the publish chain only (release.yml).
skip-github-release: true
token: ${{ steps.app.outputs.token }}
# ADVISORY: nothing waits on it, so a red run never holds the rc cut.
release-pr-lockfile:
needs: release-please
if: needs.release-please.outputs.pr != ''
permissions:
contents: read
uses: ./.github/workflows/_release-pr-lockfile.yml
with:
pr: ${{ needs.release-please.outputs.pr }}
secrets: inherit