Skip to content

Commit

Permalink
fix: rules goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsm-dev committed Jun 17, 2022
1 parent 2c8cbca commit f72d9b4
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
---
project_name: loli
env:
- GO111MODULE=on
Expand All @@ -12,11 +9,6 @@ before:
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
release:
github:
owner: ci-monk
name: loli
name_template: "v{{.Version}}"
builds:
- id: loli
binary: loli
Expand All @@ -29,26 +21,26 @@ builds:
- windows
goarch:
- amd64
- "386"
- arm
- arm64
ignore:
- goos: darwin
goarch: "386"
- goos: darwin
goarch: arm64
- ppc64le
mod_timestamp: "{{.CommitTimestamp}}"
flags:
- -trimpath
ldflags:
- -s -w -X "github.com/ci-monk/loli/internal/version.cliVersion={{.Env.CLIENT_VERSION}}" -X "github.com/ci-monk/loli/internal/version.builtDate={{.CommitDate}}" -X "github.com/ci-monk/loli/internal/version.builtBy=goreleaser" -X "github.com/ci-monk/loli/internal/version.commit={{.Commit}}" -X "github.com/ci-monk/loli/internal/version.commitShort={{.ShortCommit}}" -X "github.com/ci-monk/loli/internal/version.commitBranch={{.Env.GIT_BRANCH}}" -X "github.com/ci-monk/loli/internal/version.goVersion={{.Env.GO_VERSION}}"
- -s -w
- -X "github.com/ci-monk/loli/internal/version.builtDate={{.CommitDate}}"
- -X "github.com/ci-monk/loli/internal/version.builtBy=goreleaser"
- -X "github.com/ci-monk/loli/internal/version.cliVersion={{.Env.CLIENT_VERSION}}"
- -X "github.com/ci-monk/loli/internal/version.commit={{.Commit}}"
- -X "github.com/ci-monk/loli/internal/version.commitShort={{.ShortCommit}}"
- -X "github.com/ci-monk/loli/internal/version.commitBranch={{.Env.GIT_BRANCH}}"
- -X "github.com/ci-monk/loli/internal/version.goVersion={{.Env.GO_VERSION}}"
archives:
- name_template: "{{.ProjectName}}_v{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
darwin: Darwin
linux: Linux
windows: Windows
"386": i386
amd64: x86_64
format_overrides:
- goos: windows
Expand All @@ -57,9 +49,14 @@ archives:
- LICENSE
- README.md
snapshot:
name_template: 'SNAPSHOT-{{ .Commit }}'
name_template: "SNAPSHOT-{{ .Commit }}"
checksum:
name_template: '{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS'
name_template: "{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS"
algorithm: sha256
release:
github:
owner: ci-monk
name: loli
name_template: "v{{.Version}}"
changelog:
skip: true

0 comments on commit f72d9b4

Please sign in to comment.