Skip to content

Commit bc5ed71

Browse files
committed
feat: Add release-please
Signed-off-by: Marcelo E. Magallon <[email protected]>
1 parent ce8521a commit bc5ed71

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"packages": {
3+
".": {
4+
"release-type": "go",
5+
"bump-minor-pre-major": true,
6+
"bump-patch-for-minor-pre-major": false,
7+
"include-component-in-tag": false,
8+
"changelog-sections": [
9+
{ "type": "feat", "section": "Features" },
10+
{ "type": "fix", "section": "Fixes" },
11+
{ "type": "docs", "section": "Documentation" },
12+
{ "type": "chore", "section": "Miscellaneous Chores" }
13+
]
14+
}
15+
},
16+
"draft-pull-request": true,
17+
"pull-request-title-pattern": "chore: release ${version}",
18+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.10.0"
3+
}

.github/workflows/release-please.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
id-token: write
13+
14+
jobs:
15+
release-please:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Retrieve release app credentials
19+
id: get-secrets
20+
uses: grafana/shared-workflows/actions/get-vault-secrets@main
21+
with:
22+
repo_secrets: |
23+
GITHUB_APP_ID=github-app:app-id
24+
GITHUB_APP_INSTALLATION_ID=github-app:app-installation-id
25+
GITHUB_APP_PRIVATE_KEY=github-app:private-key
26+
27+
- name: Get repository name
28+
env:
29+
REPOSITORY: ${{ github.repository }}
30+
id: info
31+
run: echo "repository_name=${REPOSITORY#*/}" >> "$GITHUB_OUTPUT"
32+
33+
- name: Generate a token
34+
id: generate-token
35+
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1
36+
with:
37+
app-id: ${{ env.GITHUB_APP_ID }}
38+
private-key: ${{ env.GITHUB_APP_PRIVATE_KEY }}
39+
owner: ${{ github.repository_owner }}
40+
repositories: ${{ steps.info.outputs.repository_name }}
41+
42+
- name: Release
43+
id: release
44+
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4
45+
with:
46+
token: ${{ steps.generate-token.outputs.token }}
47+
target-branch: main
48+
config-file: .github/release-please/release-please-config.json
49+
manifest-file: .github/release-please/release-please-manifest.json

0 commit comments

Comments
 (0)