Skip to content

Commit 23b05fa

Browse files
authored
Modified github action of release by tag to goreleaser (#117)
1 parent 0868c4b commit 23b05fa

File tree

1 file changed

+20
-26
lines changed

1 file changed

+20
-26
lines changed

.github/workflows/release-tag.yaml

+20-26
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
1-
name: release
1+
name: release tag
22
on:
33
push:
44
tags:
5-
- "v[0-9]+.[0-9]+.[0-9]+"
6-
5+
- "v[0-9]+.[0-9]+.[0-9]+"
6+
permissions:
7+
contents: write
78
jobs:
89
release:
910
runs-on: ubuntu-latest
1011
steps:
11-
- name: Set up Go 1.13
12-
uses: actions/setup-go@v2
13-
with:
14-
go-version: 1.13
15-
id: go
16-
17-
- name: Check out code into the Go module directory
18-
uses: actions/checkout@v2
19-
20-
- name: Build
21-
env:
22-
GO111MODULE: on
23-
GOPATH: /home/runner/work/
24-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25-
run: |
26-
go get -u github.com/x-motemen/gobump/cmd/gobump
27-
go get -u github.com/tcnksm/ghr
28-
go get -u github.com/Songmu/ghch/cmd/ghch
29-
go get -u github.com/Songmu/goxz/cmd/goxz
30-
export TAGNAME=$($GOPATH/bin/gobump show -r)
31-
echo "DEBUG:" $TAGNAME
32-
$GOPATH/bin/goxz -pv $TAGNAME -os=linux -arch=amd64 -d ./dist/v$TAGNAME
33-
$GOPATH/bin/ghr -n=v$TAGNAME -b="$($GOPATH/bin/ghch -F markdown --latest)" -draft v$TAGNAME ./dist/v$TAGNAME
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- name: Set up Go
17+
uses: actions/setup-go@v4
18+
with:
19+
go-version: stable
20+
- name: Run GoReleaser
21+
uses: goreleaser/goreleaser-action@v5
22+
with:
23+
distribution: goreleaser
24+
version: v1.23.0
25+
args: release --clean
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)