build: add goreleaser to build tool (#6)
Add the `goreleaser` tool to the repository to handle building and publishing the application. Add a simple configuration file to build the application for all major OS versions. Update the Makefile to include commands to build release and snapshot versions of the tool. Add a placeholder CHANGELOG file to be included in the package files.
This commit is contained in:
parent
188626198f
commit
570c162c13
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:
|
||||
go fmt $(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 New Issue
Block a user