Skip to content

Commit 22d8192

Browse files
authored
fix release drafting (#144)
Signed-off-by: HaniAlshikh <[email protected]> Signed-off-by: HaniAlshikh <[email protected]>
1 parent be4f5fe commit 22d8192

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

.github/release-drafter.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name-template: 'v$RESOLVED_VERSION'
2-
tag-template: 'v$RESOLVED_VERSION'
1+
name-template: '$RESOLVED_VERSION'
2+
tag-template: '$RESOLVED_VERSION'
33
categories:
44
- title: 'Features'
55
labels:
@@ -18,6 +18,7 @@ categories:
1818
- 'chore'
1919
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
2020
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
21+
version-template: "v$MAJOR.$MINOR.$PATCH"
2122
version-resolver:
2223
major:
2324
labels:

.github/workflows/release.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,30 @@ jobs:
1616
goreleaser:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- name: Checkout code
20+
uses: actions/checkout@v3
2021
with:
2122
fetch-depth: 0
2223
- run: git fetch --force --tags
23-
- uses: actions/setup-go@v3
24+
- name: Setup Go
25+
uses: actions/setup-go@v3
2426
with:
2527
go-version: ${{ env.GO_VERSION }}
2628
cache: true
27-
# More assembly might be required: Docker logins, GPG, etc. It all depends
28-
# on your needs.
29-
- uses: goreleaser/goreleaser-action@v3
29+
- name: set VERSION
30+
run: echo "VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
31+
- name: Publish draft
32+
uses: release-drafter/release-drafter@v5
33+
with:
34+
version: ${{ env.VERSION }}
35+
publish: true
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
38+
- name: Release
39+
uses: goreleaser/goreleaser-action@v3
3040
with:
31-
# either 'goreleaser' (default) or 'goreleaser-pro':
3241
distribution: goreleaser
3342
version: latest
3443
args: release --rm-dist
3544
env:
36-
GITHUB_TOKEN: ${{ secrets.GORELEASER_REPO_WRITE }}
45+
GITHUB_TOKEN: ${{ secrets.GORELEASER_REPO_WRITE }}

.goreleaser.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ archives:
2323
darwin: osx
2424
windows: win
2525
name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
26-
2726
checksum:
2827
name_template: "checksums.txt"
2928
snapshot:

0 commit comments

Comments
 (0)