Skip to content

Commit 766bb27

Browse files
committed
#38: Add release drafter & changelog workflow
1 parent 32ab692 commit 766bb27

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

.github/release-drafter.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name-template: "v$RESOLVED_VERSION"
2+
tag-template: "v$RESOLVED_VERSION"
3+
categories:
4+
- title: "Features"
5+
label: type/feature
6+
- title: "Bug Fixes"
7+
label: type/bug
8+
- title: "Other"
9+
label: type/other
10+
change-template: "- #$NUMBER: $TITLE"
11+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
12+
version-resolver:
13+
major:
14+
labels:
15+
- "major"
16+
minor:
17+
labels:
18+
- "minor"
19+
patch:
20+
labels:
21+
- "patch"
22+
default: patch
23+
template: |
24+
## Changes
25+
26+
$CHANGES
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- main
8+
9+
jobs:
10+
update_release_draft:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: release-drafter/release-drafter@v5
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Update Changelog
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
update-changelog:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Update changelog
13+
run: |
14+
npm install github-release-notes
15+
export GREN_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
16+
npm run overrideChangelog
17+
- name: Create Pull Request
18+
uses: peter-evans/create-pull-request@v3
19+
with:
20+
commit-message: "Update changelog"
21+
title: Update Changelog
22+
body: Update changelog to reflect release changes
23+
branch: update-changelog
24+
base: main
25+
delete-branch: true

0 commit comments

Comments
 (0)