Skip to content

Commit

Permalink
Merge pull request #33 from tomtwinkle/enhancement/release-drafter
Browse files Browse the repository at this point in the history
add release drafter
  • Loading branch information
tomtwinkle authored Aug 14, 2023
2 parents d6bede5 + 251a0fa commit adec334
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'

categories:
- title: '🚀 Features'
labels:
- 'feature'
- title: '💪 Enhancement'
labels:
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
- title: '🔧 Refactoring'
label: 'refactor'
- title: '📖 Documentation'
label: 'documentation'
- title: '⛓️ Dependency update'
label: 'dependencies'

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:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: minor

template: |
## Changes
$CHANGES
autolabeler:
- label: feature
branch:
- '/^feat(ure)?[/-].+/'
- label: bug
branch:
- '/^fix[/-].+/'
- '/^hotfix[/-].+/'
- label: chore
branch:
- '/^chore[/-].+/'
- label: refactor
branch:
- '/(refactor|refactoring)[/-].+/'
- label: documentation
branch:
- '/doc(umentation)[/-].+/'
files:
- '*.md'
- label: enhancement
branch:
- '/(enhancement|improve)[/-].+/'
- label: github
files:
- '.github/**/*'
- label: patch
branch:
- '/(enhancement|improve)[/-].+/'
- '/doc(umentation)[/-].+/'
4 changes: 4 additions & 0 deletions .github/workflows/go-pr-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- develop

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: go-pr-release
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@65c5fb495d1e69aa8c08a3317bc44ff8aabe9772 # v5.24.0
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
with:
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
goreleaser:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- synchronize
- reopened

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test
Expand Down

0 comments on commit adec334

Please sign in to comment.