Skip to content

Commit 7295d05

Browse files
authored
Merge pull request #5 from furusax0621/introduce-ci-release
Introduce GitHub Actions Release workflow
2 parents f74cece + 7c295de commit 7295d05

File tree

3 files changed

+38
-6
lines changed

3 files changed

+38
-6
lines changed

.github/workflows/release.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v3
19+
with:
20+
go-version: "1.19"
21+
cache: true
22+
23+
- name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v4
25+
with:
26+
distribution: goreleaser
27+
version: latest
28+
args: release --rm-dist
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ random_data_load*
22
vendor/
33
bin/*
44
dist/*
5+
6+
dist/

.goreleaser.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ builds:
1010
- env:
1111
- CGO_ENABLED=0
1212
archives:
13-
- replacements:
14-
darwin: Darwin
15-
linux: Linux
16-
windows: Windows
17-
386: i386
18-
amd64: x86_64
13+
- name_template: >-
14+
{{ .ProjectName }}_
15+
{{- title .Os }}_
16+
{{- if eq .Arch "amd64" }}x86_64
17+
{{- else if eq .Arch "386" }}i386
18+
{{- else }}{{ .Arch }}{{ end }}
1919
checksum:
2020
name_template: 'checksums.txt'
2121
snapshot:

0 commit comments

Comments
 (0)