Skip to content

Commit 323e0d1

Browse files
Add Release Drafter CI (#886)
* Add Release Drafter CI * Fix tag selector
1 parent 7326d3c commit 323e0d1

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

.github/release-drafter.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# These will be overridden by the publish workflow and set to the new tag
2+
name-template: 'Next Release'
3+
tag-template: 'next'
4+
5+
# Optionally configure your categories and other templates
6+
exclude-labels:
7+
- dependencies
8+
categories:
9+
- title: 'Enhancements'
10+
labels:
11+
- 'feature'
12+
- 'enhancement'
13+
- title: 'Bug Fixes'
14+
labels:
15+
- 'bug'
16+
- title: 'Documentation'
17+
label: 'documentation'
18+
- title: 'Project Hygiene'
19+
labels:
20+
- hygiene
21+
- ci
22+
23+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
24+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
25+
26+
template: |
27+
## Changes
28+
29+
$CHANGES
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
update_release_draft:
13+
permissions:
14+
# Write permission is required to create a GitHub release
15+
contents: write
16+
pull-requests: read
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: release-drafter/release-drafter@v5
20+
with:
21+
disable-autolabeler: true
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release Publisher
2+
3+
on:
4+
push:
5+
tags:
6+
- "*.*.*"
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
publish_release:
13+
permissions:
14+
# Write permission is required to publish a GitHub release
15+
contents: write
16+
pull-requests: read
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Set version env
20+
# Use a little bit of bash to extract the tag name from the GitHub ref
21+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
22+
- uses: release-drafter/release-drafter@v5
23+
with:
24+
disable-autolabeler: true
25+
# Override the Release name/tag/version with the actual tag name
26+
name: ${{ env.RELEASE_VERSION }}
27+
tag: ${{ env.RELEASE_VERSION }}
28+
version: ${{ env.RELEASE_VERSION }}
29+
# Publish the Release
30+
publish: true
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)