Skip to content

Commit 25c655c

Browse files
ci: add release-drafter
1 parent 162cb69 commit 25c655c

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## What
2+
3+
## Why
4+
5+
## Notes
6+
<!-- Add any notes here -->

.github/release-drafter.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
4+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
5+
template: |
6+
## Changes
7+
8+
$CHANGES

.github/workflows/draft-release.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Reference: https://github.com/release-drafter/release-drafter
2+
name: Create Release
3+
4+
on:
5+
push:
6+
branches:
7+
- rootless
8+
9+
jobs:
10+
create_release:
11+
name: Create Release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set up YQ
20+
uses: frenck/action-setup-yq@v1
21+
22+
- name: Get release version from service.yaml
23+
run: |
24+
RELEASE_VERSION=$(yq eval '.version' service.yaml )
25+
echo "RELEASE_VERSION=v$RELEASE_VERSION-rootless" >> $GITHUB_ENV
26+
27+
- uses: release-drafter/release-drafter@v5
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
with:
31+
publish: true
32+
name: ${{ env.RELEASE_VERSION }}
33+
version: ${{ env.RELEASE_VERSION }}
34+
tag: ${{ env.RELEASE_VERSION }}
35+
config-name: release-drafter.yaml

0 commit comments

Comments
 (0)