Skip to content

Commit

Permalink
chore: add golangi cli and release config files
Browse files Browse the repository at this point in the history
  • Loading branch information
rach-id committed Jun 27, 2024
1 parent 0ae124a commit 6621540
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
run:
timeout: 5m
modules-download-mode: readonly

linters:
enable:
- exportloopref
- gofumpt
- misspell
- revive
- prealloc
63 changes: 63 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

before:
hooks:
- go mod tidy
builds:
- main: ./cmd/blobstreamx-monitor
binary: blobstreamx-monitor
env:
- VersioningPath={{ "github.com/celestiaorg/blobstreamx-monitor/cmd/blobstreamx-monitor/version" }}
goarch:
- amd64
- arm64
goos:
- darwin
- linux
ldflags:
# Ref: https://goreleaser.com/customization/templates/#common-fields
#
# .CommitDate is used to help with reproducible builds, ensuring that the
# same date is always used
#
# .FullCommit is git commit hash goreleaser is using for the release
#
# .Version is the version being released
- -X "{{ .Env.VersioningPath }}.buildTime={{ .CommitDate }}"
- -X "{{ .Env.VersioningPath }}.lastCommit={{ .FullCommit }}"
- -X "{{ .Env.VersioningPath }}.semanticVersion={{ .Version }}"
dist: ./build/goreleaser
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of
# uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
checksum:
name_template: "checksums.txt"
signs:
- artifacts: checksum
args:
[
"--batch",
"-u",
"{{ .Env.GPG_FINGERPRINT }}",
"--output",
"${signature}",
"--detach-sign",
"${artifact}",
]
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"

0 comments on commit 6621540

Please sign in to comment.