Repository navigation
57 lines (53 loc) · 2.25 KB
/
Copy pathrelease-please.yml
File metadata and controls
57 lines (53 loc) · 2.25 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
name: release-please
# Keeps one open release pull request that collects the Conventional Commits
# merged since the last release into CHANGELOG.md and picks the next version.
# Merging it pushes the vX.Y.Z tag and a draft GitHub release; the tag starts
# release.yml, which uploads the provider plugin to that release, publishes it,
# tags the Go SDK and publishes the npm, PyPI and NuGet SDKs. The Pulumi
# Registry picks the published release up from there.
#
# Needs the organization's release bot GitHub App, because tags and pull
# requests made with the workflow's own GITHUB_TOKEN do not start other
# workflows:
# variable RELEASE_BOT_APP_ID (or RELEASE_BOT_CLIENT_ID) and
# secret RELEASE_BOT_PRIVATE_KEY.
"on":
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: release-please
cancel-in-progress: false
jobs:
release-please:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check the release bot is set up
id: bot
env:
APP_ID: ${{ vars.RELEASE_BOT_APP_ID }}
CLIENT_ID: ${{ vars.RELEASE_BOT_CLIENT_ID }}
HAS_KEY: ${{ secrets.RELEASE_BOT_PRIVATE_KEY != '' }}
run: |
if { [ -n "${APP_ID}" ] || [ -n "${CLIENT_ID}" ]; } && [ "${HAS_KEY}" = "true" ]; then
echo "ready=true" >> "$GITHUB_OUTPUT"
else
echo "::warning title=release-please skipped::Set the variable RELEASE_BOT_APP_ID and secret RELEASE_BOT_PRIVATE_KEY (see CONTRIBUTING.md, Releasing)."
echo "ready=false" >> "$GITHUB_OUTPUT"
fi
- uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0
if: steps.bot.outputs.ready == 'true'
id: app
with:
# GitHub accepts either the App ID or the Client ID here.
client-id: ${{ vars.RELEASE_BOT_CLIENT_ID || vars.RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
if: steps.bot.outputs.ready == 'true'
with:
token: ${{ steps.app.outputs.token }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json