Skip to content

Commit

Permalink
chore: set up release drafter (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKetmo authored Sep 14, 2023
1 parent 4f0d3e8 commit e5afdba
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
change-template: '* $TITLE (#$NUMBER) by @$AUTHOR'
template: |
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
sort-direction: ascending

categories:
- title: '⚠️ BREAKING CHANGES'
label: 'breaking'
- title: '💫 Features'
label: 'feature'
- title: '🛠️ Bug fixes'
label: 'fix'
- title: '🕹️ Others'
label: 'chore'

version-resolver:
# Major is not meant to be used at the moment.
# Should be used with label breaking in the future.
major:
labels:
- 'major'
minor:
labels:
- 'breaking'
- 'feature'
- 'chore'
patch:
labels:
- 'fix'

exclude-labels:
- 'skip-changelog'

autolabeler:
- label: 'breaking'
title:
- '/!:/i'
- label: 'chore'
title:
- '/^chore/i'
- label: 'fix'
title:
- '/^fix/i'
- label: 'feature'
title:
- '/^feat/i'
29 changes: 29 additions & 0 deletions .github/workflows/pr-title.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Validate PR title'

on:
pull_request:
branches: [ main ]
types: [ opened, reopened, synchronize ]

permissions:
pull-requests: read
statuses: write

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
# Please look up the latest version from
# https://github.com/amannn/action-semantic-pull-request/releases
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
fix
feat
chore
requireScope: false
wip: true
validateSingleCommit: false
22 changes: 22 additions & 0 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release Drafter

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [ opened, reopened, synchronize ]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e5afdba

Please sign in to comment.