-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (65 loc) · 2.29 KB
/
release-please.yml
File metadata and controls
71 lines (65 loc) · 2.29 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
name: "Release Please: alternative to sematic release that creates PRs instead of directly releasing, allowing for manual review and merge"
run-name: "Release Please"
on:
workflow_call:
inputs:
release-type:
description: "Release Please release type (node, java, go, python, etc.)"
required: false
type: string
default: node
target-branch:
description: "Branch to open release PRs against (usually main)"
required: false
type: string
default: main
config-file:
description: "Optional Release Please config file path"
required: false
type: string
default: ""
manifest-file:
description: "Optional Release Please manifest file path"
required: false
type: string
default: ""
app-id:
description: "GitHub App ID used to create the release token"
required: true
type: string
secrets:
GH_ORG_PRIVATE_KEY:
description: "GitHub App private key used to create the release token"
required: true
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
env:
GH_ORG_APP_ID: ${{ inputs.app-id }}
GH_ORG_PRIVATE_KEY: ${{ secrets.GH_ORG_PRIVATE_KEY }}
with:
app-id: ${{ env.GH_ORG_APP_ID }}
private-key: ${{ env.GH_ORG_PRIVATE_KEY }}
- name: Release Please
id: rp
uses: googleapis/release-please-action@v4
with:
# Use provided token if present, otherwise default to GITHUB_TOKEN
token: ${{ steps.app-token.outputs.token }}
release-type: ${{ inputs.release-type }}
target-branch: ${{ inputs.target-branch }}
# Only pass these when set (empty string is fine; action ignores missing files if not used)
config-file: ${{ inputs.config-file }}
manifest-file: ${{ inputs.manifest-file }}
- name: Output summary
if: ${{ always() }}
run: |
echo "release_created=${{ steps.rp.outputs.release_created }}"
echo "pr_created=${{ steps.rp.outputs.pr_created }}"
echo "tag_name=${{ steps.rp.outputs.tag_name }}"