Skip to content

Commit 26ac50c

Browse files
committed
Setup GitHub workflows
1 parent 6ea5867 commit 26ac50c

3 files changed

Lines changed: 89 additions & 0 deletions

File tree

.github/release-drafter.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name-template: 'v$RESOLVED_VERSION'
3+
tag-template: 'v$RESOLVED_VERSION'
4+
template: |
5+
# Changelog
6+
7+
$CHANGES
8+
9+
---
10+
11+
See details of [all code changes](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION) since previous release.
12+
13+
categories:
14+
- title: '🚀 Features'
15+
labels:
16+
- 'feature'
17+
- 'enhancement'
18+
- title: '🐛 Bug Fixes'
19+
labels:
20+
- 'fix'
21+
- 'bugfix'
22+
- 'bug'
23+
- title: '🧰 Maintenance'
24+
labels:
25+
- 'infrastructure'
26+
- 'automation'
27+
- 'documentation'
28+
- title: '🏎 Performance'
29+
label: 'performance'
30+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
31+
version-resolver:
32+
major:
33+
labels:
34+
- 'type: breaking'
35+
minor:
36+
labels:
37+
- 'type: enhancement'
38+
patch:
39+
labels:
40+
- 'type: bug'
41+
- 'type: maintenance'
42+
- 'type: documentation'
43+
default: patch
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Draft release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
draft-release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # v6.0.0
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [released]
5+
workflow_dispatch:
6+
inputs:
7+
TAG_NAME:
8+
description: 'Tag name that the major tag will point to'
9+
required: true
10+
11+
env:
12+
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
13+
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
update_tag:
19+
name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes
20+
runs-on: ubuntu-latest
21+
environment:
22+
# Note: this environment is protected
23+
name: Release
24+
steps:
25+
- name: Update the ${{ env.TAG_NAME }} tag
26+
id: update-major-tag
27+
uses: actions/publish-action@v0.3.0
28+
with:
29+
source-tag: ${{ env.TAG_NAME }}
30+
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

0 commit comments

Comments
 (0)