Skip to content

Commit 6412979

Browse files
authored
Add release drafter and align build action. (#16)
1 parent 5dddf09 commit 6412979

File tree

3 files changed

+57
-11
lines changed

3 files changed

+57
-11
lines changed

.github/release-drafter.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
4+
template: |
5+
## General Changes
6+
7+
$CHANGES
8+
9+
categories:
10+
- title: '🚀 Features'
11+
labels:
12+
- 'feature'
13+
- 'enhancement'
14+
- title: '🐛 Bug Fixes'
15+
labels:
16+
- 'fix'
17+
- 'bugfix'
18+
- 'bug'
19+
20+
version-resolver:
21+
major:
22+
labels:
23+
- 'major'
24+
minor:
25+
labels:
26+
- 'minor'
27+
patch:
28+
labels:
29+
- 'patch'
30+
default: patch

.github/workflows/main.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,29 @@ jobs:
1919
build:
2020
name: Build
2121
runs-on: ubuntu-latest
22+
2223
steps:
23-
- name: Set up Go 1.21
24-
uses: actions/setup-go@v4
24+
- name: Log in to the Container registry
25+
uses: docker/login-action@v2
2526
with:
26-
go-version: "1.21"
27-
id: go
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
2830

2931
- name: Check out code into the Go module directory
3032
uses: actions/checkout@v3
3133

34+
- name: Set up Go 1.21
35+
uses: actions/setup-go@v4
36+
with:
37+
go-version: "1.21"
38+
cache: false
39+
3240
- name: Lint
3341
uses: golangci/golangci-lint-action@v3
3442
with:
3543
args: -p bugs -p unused --timeout=3m
3644

37-
- name: Log in to the Container registry
38-
uses: docker/login-action@v2
39-
with:
40-
registry: ${{ env.REGISTRY }}
41-
username: ${{ github.actor }}
42-
password: ${{ secrets.GITHUB_TOKEN }}
43-
4445
- name: Make tag
4546
run: |
4647
[ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV || true
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Release Drafter Action
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: release-drafter/release-drafter@v5
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)