Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try an updated release drafter #23

Merged
merged 5 commits into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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