Skip to content

Commit

Permalink
Feat: release drafter (#89)
Browse files Browse the repository at this point in the history
* feat(ci): add pre-release-drafter GH action

* fix(ci): prerelease-identifier in config

* feat(ci): autolabel PRs
  • Loading branch information
vermut authored May 25, 2024
1 parent be1bc67 commit 1125251
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
add-missing-labels: true
clear-prexisting: false
include-commits: true
label-mapping:
bugfix: [ 'fix', 'bug' ]
feature: [ 'feat', 'feature' ]
misc: [ 'chore','performance','refactor','style' ]
26 changes: 26 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name-template: "v$RESOLVED_VERSION 🚜"
tag-template: "v$RESOLVED_VERSION"
sort-direction: ascending
prerelease-identifier: edge
categories:
- title: "⚠ Breaking changes"
label: "breaking change"
- title: "🚀 Features"
labels:
- "feature"
- title: "🔧 Code enhancements"
labels:
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- "bugfix"
- "bug"
- title: "🈵 Translations"
label: "translation"
- title: "📄 Documentation"
label: "documentation"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
template: |
$CHANGES
4 changes: 2 additions & 2 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
- 'main'
- 'releases/**'
tags:
- 'v*.*.*'
- 'v*'
pull_request:
branches:
- 'main'

# Allow to stop obsolete workflows
# Allow stopping obsolete workflows
concurrency:
group: ci-buildtrain-${{ github.ref }}-1
cancel-in-progress: true
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/label-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'Label PR'
on:
pull_request:

jobs:
label-pr:
runs-on: ubuntu-latest
steps:
- uses: grafana/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release Drafter

on:
push:
branches:
- main

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: read
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v6
with:
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1125251

Please sign in to comment.