Mining/.goreleaser.yaml

113 lines
2.6 KiB
YAML

# GoReleaser configuration
# https://goreleaser.com
version: 2
before:
hooks:
- go mod tidy
- go test ./...
# Build the UI for the release
- sh -c 'cd ui && npm install && npm run build'
builds:
- id: mining-cli
main: ./cmd/mining
binary: miner-cli
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
goarm:
- "7"
ldflags:
- -s -w
- -X github.com/Snider/Mining/pkg/mining.version={{.Version}}
- -X github.com/Snider/Mining/pkg/mining.commit={{.Commit}}
- -X github.com/Snider/Mining/pkg/mining.date={{.Date}}
archives:
- id: mining
name_template: >-
{{ .Binary }}-{{ .Version }}-
{{- title .Os }}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
formats: [ 'zip' ]
files:
- README.md
- LICENSE
# Add the compiled UI to the archive.
# This will place the contents of ui/dist into a 'ui' directory in the archive.
- src: ui/dist/mbe-mining-dashboard.js
strip_parent: true
checksum:
name_template: 'checksums.txt'
snapshot:
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
use: github
filters:
exclude:
- '^docs:'
- '^test:'
- '^chore:'
- 'merge conflict'
- Merge pull request
- Merge remote-tracking branch
- Merge branch
groups:
- title: 'New Features'
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: 'Bug fixes'
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: 'Performance Improvements'
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
order: 2
- title: 'Documentation updates'
regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$'
order: 3
- title: Other work
order: 999
release:
github:
owner: Snider
name: Mining
draft: false
prerelease: auto
mode: replace
header: |
## Mining Release {{ .Tag }}
**Full Changelog**: https://github.com/Snider/Mining/compare/{{ .PreviousTag }}...{{ .Tag }}
# Upload the standalone UI file as a release asset.
extra_files:
- glob: mbe-mining-dashboard.js
name_template: "mbe-mining-dashboard-{{ .Version }}.js"
# Announce releases
announce:
skip: false
discord:
enabled: true
message_template: "miner-cli {{.Tag}} is out! Check it out at {{ .ReleaseURL }}"
author: "Lethean Releases"