Skip to content

Commit 9910584

Browse files
authored
ci: add release automation (#78)
* ci: add release automation * fixup! ci: add release automation * ci: delete job permission Because we use app token that has the permissions. Do we need to pass permission to GITHUB_TOKEN?
1 parent c4eaccc commit 9910584

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/release-please-config.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"packages": {
3+
".": {
4+
"changelog-path": "CHANGELOG.md",
5+
"release-type": "simple",
6+
"bump-minor-pre-major": false,
7+
"bump-patch-for-minor-pre-major": false,
8+
"draft": false,
9+
"prerelease": false,
10+
"always-update": true
11+
}
12+
},
13+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
14+
}

.github/workflows/release.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions: {}
9+
10+
jobs:
11+
release-please:
12+
timeout-minutes: 5
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
16+
id: app-token
17+
with:
18+
app-id: ${{ secrets.RELEASE_APP_ID }}
19+
private-key: ${{ secrets.RELEASE_PRIVATE_KEY }}
20+
permission-contents: write
21+
permission-pull-requests: write
22+
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
23+
with:
24+
token: ${{ steps.app-token.outputs.token }}
25+
release-type: simple

0 commit comments

Comments
 (0)