Skip to content

Commit

Permalink
chore: build support m1
Browse files Browse the repository at this point in the history
  • Loading branch information
zcong1993 committed Nov 7, 2021
1 parent 48a0ba1 commit f2bd653
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@master
Expand All @@ -16,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.15
go-version: 1.17
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ toc
solve

.leetcode.json

dist/
32 changes: 23 additions & 9 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- main: cmd/main.go
binary: leetcode-tool
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X main.builtBy=goreleaser
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
- linux
goarch:
- amd64
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^refactor'
- '^tweak'
- '^test'
- '^test:'
brews:
- tap:
owner: zcong1993
Expand Down

0 comments on commit f2bd653

Please sign in to comment.