Skip to content

Commit f2bd653

Browse files
committed
chore: build support m1
1 parent 48a0ba1 commit f2bd653

File tree

3 files changed

+27
-10
lines changed

3 files changed

+27
-10
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
goreleaser:
99
runs-on: ubuntu-latest
1010
if: startsWith(github.ref, 'refs/tags/')
11+
timeout-minutes: 10
1112
steps:
1213
- name: Checkout
1314
uses: actions/checkout@master
@@ -16,7 +17,7 @@ jobs:
1617
- name: Set up Go
1718
uses: actions/setup-go@master
1819
with:
19-
go-version: 1.15
20+
go-version: 1.17
2021
- name: Run GoReleaser
2122
uses: goreleaser/goreleaser-action@v2
2223
with:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ toc
4242
solve
4343

4444
.leetcode.json
45+
46+
dist/

.goreleaser.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
1+
# This is an example .goreleaser.yml file with some sensible defaults.
2+
# Make sure to check the documentation at https://goreleaser.com
3+
before:
4+
hooks:
5+
# You may remove this if you don't use go modules.
6+
- go mod tidy
7+
# you may remove this if you don't need go generate
8+
- go generate ./...
19
builds:
2-
- main: cmd/main.go
3-
binary: leetcode-tool
4-
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X main.builtBy=goreleaser
10+
- env:
11+
- CGO_ENABLED=0
512
goos:
13+
- linux
614
- windows
715
- darwin
8-
- linux
9-
goarch:
10-
- amd64
16+
archives:
17+
- replacements:
18+
darwin: Darwin
19+
linux: Linux
20+
windows: Windows
21+
386: i386
22+
amd64: x86_64
23+
checksum:
24+
name_template: 'checksums.txt'
25+
snapshot:
26+
name_template: "{{ incpatch .Version }}-next"
1127
changelog:
1228
sort: asc
1329
filters:
1430
exclude:
1531
- '^docs:'
16-
- '^refactor'
17-
- '^tweak'
18-
- '^test'
32+
- '^test:'
1933
brews:
2034
- tap:
2135
owner: zcong1993

0 commit comments

Comments
 (0)