mirror of
https://github.com/jimeh/casecmp.git
synced 2026-02-19 02:16:40 +00:00
fix(release): fix goreleaser setup
This commit is contained in:
@@ -27,16 +27,8 @@ jobs:
|
||||
working_directory: /go/src/github.com/jimeh/casecmp
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Install tools
|
||||
command: |
|
||||
go get github.com/goreleaser/goreleaser
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: go mod download
|
||||
- run:
|
||||
name: Run goreleaser
|
||||
command: goreleaser
|
||||
- run: curl -sL https://git.io/goreleaser | bash
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
bin/*
|
||||
dist/*
|
||||
releases/*
|
||||
dist/
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
project_name: casecmp
|
||||
before:
|
||||
hooks:
|
||||
- go mod tidy
|
||||
builds:
|
||||
- main: main.go
|
||||
binary: casecmp
|
||||
flags: -a
|
||||
env:
|
||||
- env:
|
||||
- CGO_ENABLED=0
|
||||
mod_timestamp: "{{ .CommitTimestamp }}"
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- "-s -w -X main.version={{ .Version }} -X main.commit={{ .Commit }}"
|
||||
goos:
|
||||
- darwin
|
||||
- freebsd
|
||||
@@ -17,18 +21,29 @@ builds:
|
||||
goarm:
|
||||
- 6
|
||||
- 7
|
||||
archive:
|
||||
name_template: '{{ .ProjectName }}-{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm
|
||||
}}v{{ .Arm }}{{ end }}'
|
||||
format: tar.gz
|
||||
wrap_in_directory: true
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
before:
|
||||
hooks:
|
||||
- make clean
|
||||
git:
|
||||
short_hash: true
|
||||
|
||||
archives:
|
||||
- format: tar.gz
|
||||
name_template: |-
|
||||
{{ .ProjectName }}-{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}
|
||||
wrap_in_directory: true
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
replacements:
|
||||
darwin: Darwin
|
||||
linux: Linux
|
||||
windows: Windows
|
||||
386: i386
|
||||
amd64: x86_64
|
||||
|
||||
checksum:
|
||||
name_template: "checksums.txt"
|
||||
snapshot:
|
||||
name_template: snapshot-{{.Commit}}
|
||||
name_template: "{{ .Tag }}-next"
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- "^docs:"
|
||||
- "^test:"
|
||||
|
||||
Reference in New Issue
Block a user