Skip to content

Commit dfc7102

Browse files
authored
feat: add release please workflow (#7)
1 parent 7846436 commit dfc7102

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
name: release-please
7+
jobs:
8+
release-please:
9+
runs-on: ubuntu-latest
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref }}
12+
cancel-in-progress: true
13+
steps:
14+
- name: Release please
15+
id: release
16+
uses: googleapis/release-please-action@v4
17+
18+
- name: Checkout repository
19+
if: ${{ steps.release.outputs.release_created }}
20+
uses: actions/checkout@v4
21+
22+
- name: Create tag major version
23+
if: ${{ steps.release.outputs.release_created }}
24+
run: |
25+
git config user.name github-actions[bot]
26+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
27+
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/googleapis/release-please-action.git"
28+
29+
git push origin --delete v2
30+
git tag -a v2 -m "Re-Releasing v2"
31+
git push origin v2

release-please-config.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"include-v-in-tag": true,
3+
"tag-separator": "/",
4+
"separate-pull-requests": true,
5+
"draft-pull-request": true,
6+
"release-label": "autorelease: tagged",
7+
"label": "autorelease: pending",
8+
"changelog-sections": [
9+
{"type":"feat","section":"Features","hidden":false},
10+
{"type":"feature","section":"Features","hidden":false},
11+
{"type":"fix","section":"Bugfix","hidden":false},
12+
{"type":"docs","section":"Documentation","hidden":false},
13+
{"type":"refactor","section":"Refactor","hidden":false},
14+
{"type":"ci","section":"CI","hidden":false},
15+
{"type":"build","section":"CI","hidden":false},
16+
{"type":"config","section":"Config","hidden":false},
17+
{"type":"infra","section":"Config","hidden":false},
18+
{"type":"chore","section":"Chore","hidden":false} ],
19+
"packages": {
20+
".": {
21+
"changelog-path": "CHANGELOG.md",
22+
"release-type": "simple"
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)