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

chore: set up release drafter #11

Merged
merged 1 commit into from
Sep 14, 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
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 }}
Loading