Repository navigation
Expand file tree
/
Copy pathrelease-please.yml
More file actions
53 lines (53 loc) · 2.42 KB
/
Copy pathrelease-please.yml
File metadata and controls
53 lines (53 loc) · 2.42 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
# Place at .github/workflows/release-please.yml in an adopting repository; it replaces examples/release-tag.yml.
# One tag job per release policy, then release-please: `needs` guarantees the tags exist before the
# merged release PR is reconciled, so a failed tagging job blocks the next release PR until it is rerun.
name: Release
on:
push:
branches: [main]
# Recovery when GitHub created no run for a release push: replays that push's validation on the given commit.
workflow_dispatch:
inputs:
release-commit:
description: Full SHA of the release commit on main whose push produced no run
type: string
required: true
permissions:
contents: read
# One run per pushed commit, never cancelled or replaced: release-tag validates only before..after, so a replaced run would leave its bump untagged.
concurrency:
group: release-please-${{ inputs.release-commit || github.sha }}
cancel-in-progress: false
jobs:
tag-root:
# contents: write lets release-tag.yml publish GitHub-only releases; delete any separate publish workflow.
permissions:
contents: write
# Replace with the full merged, reviewed github-workflows commit SHA (same SHA for every job and every other github-workflows caller, publishers included).
uses: BehindTheMusicTree/github-workflows/.github/workflows/release-tag.yml@REPLACE_WITH_MERGED_COMMIT_SHA
with:
app-id: ${{ vars.RELEASE_APP_ID }}
release-policy-path: .github/release-policy.json
secrets:
release-app-private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
tag-graph:
permissions:
contents: write
uses: BehindTheMusicTree/github-workflows/.github/workflows/release-tag.yml@REPLACE_WITH_MERGED_COMMIT_SHA
with:
app-id: ${{ vars.RELEASE_APP_ID }}
release-policy-path: .github/graph-release-policy.json
secrets:
release-app-private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
release-please:
needs: [tag-root, tag-graph]
uses: BehindTheMusicTree/github-workflows/.github/workflows/release-please.yml@REPLACE_WITH_MERGED_COMMIT_SHA
with:
app-id: ${{ vars.RELEASE_PR_APP_ID }}
release-policies: |
.github/release-policy.json
.github/graph-release-policy.json
# Publishes without human review once the required checks pass; see README "Auto-merging release PRs".
# auto-merge: true
secrets:
release-pr-app-private-key: ${{ secrets.RELEASE_PR_APP_PRIVATE_KEY }}