Skip to content

Commit

Permalink
Try an updated release drafter (#23)
Browse files Browse the repository at this point in the history
* Try an updated release drafter

* Add update-changelog workflow

Co-authored-by: Peter Willis <[email protected]>
  • Loading branch information
pwillis-els and pwillis-eiq authored Sep 27, 2022
1 parent cc05436 commit 9ed229f
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 1 deletion.
53 changes: 52 additions & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,55 @@
autolabeler:
- label: 'chore'
files:
- '*.md'
branch:
- '/docs{0,1}\/.+/'
title:
- '/docs/i'
- label: 'bug'
branch:
- '/fix\/.+/'
title:
- '/fix/i'
- '/bug/i'
- label: 'enhancement'
branch:
- '/feature\/.+/'

name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.

version-template: "$MAJOR.MINOR"
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: minor

commitish: "main"
target_commitish: "main"

template: |
## What’s Changed
## [v$RESOLVED_VERSION]
$CHANGES
15 changes: 15 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,25 @@ on:
push:
branches:
- main
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
# pull_request_target event is required for autolabeler to support PRs from forks
# pull_request_target:
# types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
runs-on: ubuntu-latest
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
steps:
- uses: release-drafter/release-drafter@v5
env:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Update Changelog"
on:
release:
types: [published]

jobs:
update-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Update Changelog
run: |
npm install github-release-notes
export GREN_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
npm run overrideChangelog
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Update Changelog
title: Update Changelog
body: Update Changelog to reflect release changes
branch: update-changelog
base: main

0 comments on commit 9ed229f

Please sign in to comment.