Merge branch '6-setup-goreleaser-to-compile-tool' into 'main'
Resolve "Setup goreleaser to compile tool" Closes #6 See merge request hectorjsmith/fail2ban-prometheus-exporter!5
This commit is contained in:
commit
3cb7c71b17
5 changed files with 65 additions and 0 deletions
|
@ -5,6 +5,7 @@ before_script:
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
|
- build
|
||||||
|
|
||||||
format:
|
format:
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -20,3 +21,17 @@ test:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- make test
|
- make test
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
only:
|
||||||
|
- main
|
||||||
|
- tags
|
||||||
|
script:
|
||||||
|
- git fetch --tags
|
||||||
|
- make build/snapshot
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- dist/*.tar.gz
|
||||||
|
- dist/checksums.txt
|
||||||
|
expire_in: 1 day
|
||||||
|
|
34
.goreleaser.yml
Normal file
34
.goreleaser.yml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# This is an example goreleaser.yaml file with some sane defaults.
|
||||||
|
# Make sure to check the documentation at http://goreleaser.com
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
# You may remove this if you don't use go modules.
|
||||||
|
- go mod download
|
||||||
|
# you may remove this if you don't need go generate
|
||||||
|
- go generate ./...
|
||||||
|
builds:
|
||||||
|
- env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- windows
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- "386"
|
||||||
|
- arm
|
||||||
|
- arm64
|
||||||
|
goarm:
|
||||||
|
- "6"
|
||||||
|
- "7"
|
||||||
|
|
||||||
|
archives:
|
||||||
|
-
|
||||||
|
files:
|
||||||
|
- LICENSE
|
||||||
|
- README.md
|
||||||
|
- CHANGELOG.md
|
||||||
|
checksum:
|
||||||
|
name_template: 'checksums.txt'
|
||||||
|
changelog:
|
||||||
|
skip: true
|
10
CHANGELOG.md
Normal file
10
CHANGELOG.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# CHANGELOG
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
|
||||||
|
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
|
6
Makefile
6
Makefile
|
@ -13,3 +13,9 @@ go-mod-tidy:
|
||||||
format:
|
format:
|
||||||
go fmt $(go list ./... | grep -v /vendor/)
|
go fmt $(go list ./... | grep -v /vendor/)
|
||||||
go vet $(go list ./... | grep -v /vendor/)
|
go vet $(go list ./... | grep -v /vendor/)
|
||||||
|
|
||||||
|
build/snapshot:
|
||||||
|
./tools/goreleaser_linux_amd64 --snapshot --rm-dist --skip-publish
|
||||||
|
|
||||||
|
build/release:
|
||||||
|
./tools/goreleaser_linux_amd64 --rm-dist --skip-publish
|
||||||
|
|
BIN
tools/goreleaser_linux_amd64
Executable file
BIN
tools/goreleaser_linux_amd64
Executable file
Binary file not shown.
Loading…
Reference in a new issue