My own minimalist template for setting up a new Go project.
- Besides the standard go tooling, ensure you have goreleaser and
make
installed - Copy the template (e.g. via github)
- Modify default code. Find and replace
github.com/Tethik/go-template
. Renameexample
. - Modify
main: ./cmd/example/example.go
andbinary: app
in.goreleaser.yaml
Ensure you set Actions -> Workflow permissions
to Read and write permissions
make
ormake single-build
- build for just your arch. Outputs indist/
.make build
- to build for all archsmake test
- to run tests
To create a new release:
git tag -a vX.Y.Z # set your semantic version here
git push origin vX.Y.Z
Alternatively you can a manual release via make (not tested tbh)
make release