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

👷 Add release drafter and changelog workflows #1

Merged
merged 1 commit into from
Jun 15, 2023
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
47 changes: 47 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This release drafter follows the conventions from https://keepachangelog.com

name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
template: |
## What Changed 👀

$CHANGES

**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION

categories:
- title: 🚀 Features
labels:
- feature
- enhancement
- title: 🐛 Bug Fixes
labels:
- fix
- bug
- title: ⚠️ Changes
labels:
- changed
- title: ⛔️ Deprecated
labels:
- deprecated
- title: 🗑 Removed
labels:
- removed
- title: 🔐 Security
labels:
- security
- title: 📄 Documentation
labels:
- docs
- documentation
- title: 🧩 Dependency Updates
labels:
- deps
- dependencies
collapse-after: 5

change-template: '* $TITLE (#$NUMBER)' # Default "* $TITLE (#$NUMBER) @$AUTHOR"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.

exclude-labels:
- skip-changelog
27 changes: 27 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 🔖 Release Drafter 🔖

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+

permissions:
contents: read

jobs:
update_release_draft:
name: Release drafter
runs-on: ubuntu-latest
permissions:
# write permission is required to create a github release
contents: write

steps:
- name: Update Release Draft
uses: release-drafter/release-drafter@v5
with:
publish: true
prerelease: false
env:
# Instead of GITHUB_TOKEN Ref: https://github.com/stefanzweifel/changelog-updater-action/discussions/30
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 📄 Update Changelog 📄

on:
release:
types: [released]

jobs:
update:
name: Update Changelog
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# updated CHANGELOG back to the repository.
# https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.tag_name }}
release-notes: ${{ github.event.release.body }}

- name: Commit updated Changelog
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
commit_message: '🔖 Update changelog'
file_pattern: CHANGELOG.md