Skip to content

Commit

Permalink
add release-drafter
Browse files Browse the repository at this point in the history
  • Loading branch information
touchdown committed Dec 27, 2023
1 parent 1aac53e commit 56c864e
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '⚠️ Backward Incompatible'
label: 'break'
- title: '🚀 Features'
label: 'enhancement'
- title: '🐛 Bug Fixes'
label: '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-resolver:
major:
labels:
- 'break'
minor:
labels:
- 'enhancement'
patch:
labels:
- 'bug'
- 'chore'
default: patch
template: |
## Changes
$CHANGES
autolabeler:
- label: 'break'
branch:
- '/break\/.+/'
title:
- '/break/i'
- label: 'chore'
branch:
- '/chore\/.+/'
title:
- '/chore/i'
- label: 'bug'
branch:
- '/fix\/.+/'
title:
- '/fix/i'
- label: 'enhancement'
branch:
- '/feature\/.+/'
title:
- '/feature/i'
30 changes: 30 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release Drafter

on:
push:
branches:
- main
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]

permissions:
contents: read

# can maybe run locally via https://github.com/nektos/act
# act -s DOCKER_USERNAME=abc -s DOCKER_PASSWORD=xyz --container-architecture linux/arm64 -W .github/workflows/ci.yml pull_request
jobs:
update_release_draft:
timeout-minutes: 5
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
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 56c864e

Please sign in to comment.