Repository navigation
55 lines (50 loc) · 1.99 KB
/
Copy pathrelease-please.yml
File metadata and controls
55 lines (50 loc) · 1.99 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
# Release automation (issue #65): release-please maintains a rolling release
# PR (CHANGELOG.md + .release-please-manifest.json bump) from conventional
# commits on main; merging that PR cuts the semver tag + GitHub release, and
# the binaries job populates it (issue #66).
#
# Only conventional-commit squash titles (feat:, fix:, feat!:, ...) bump the
# version or appear in the changelog — see docs/how-to/release.md.
#
# Token caveat: this runs with the default GITHUB_TOKEN, and events created
# with it do not trigger other workflows. That is why the binaries build is
# chained here via workflow_call instead of an `on: push: tags` / `on:
# release` trigger (those would never fire), and why the release PR needs a
# manual nudge to get its required CI checks — see docs/how-to/release.md.
name: release-please
on:
push:
branches: [main]
permissions:
contents: read
# Serialize runs so rapid pushes to main cannot race the release PR update.
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
release-please:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
# SHA-pinned (not the mutable v5 tag): this action runs with
# contents/pull-requests write, so a compromised retag must not be able
# to swap in unreviewed privileged code. Bump the SHA deliberately.
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
id: release
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
binaries:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
permissions:
contents: write
uses: ./.github/workflows/release.yml
with:
tag: ${{ needs.release-please.outputs.tag_name }}