-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: switch to goreleaser for publishing release
Signed-off-by: Lin Yang <[email protected]>
- Loading branch information
1 parent
1466dfa
commit 0a9ac37
Showing
3 changed files
with
96 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,3 +82,5 @@ rootfs/ | |
|
||
# Interim files that can stick around from a bad mockgen run. | ||
gomock_reflect_*/ | ||
|
||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# The lines below are called `modelines`. See `:help modeline` | ||
# Feel free to remove those if you don't want/need to use them. | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||
|
||
version: 2 | ||
|
||
project_name: fsm | ||
|
||
before: | ||
hooks: | ||
- go mod download | ||
|
||
builds: | ||
# fsm build steps | ||
- id: fsm | ||
main: ./cmd/cli | ||
binary: fsm | ||
mod_timestamp: "{{ .CommitTimestamp }}" | ||
env: | ||
- CGO_ENABLED=0 | ||
ldflags: &build-ldflags | ||
- -X pkg/version.Version={{ .Env.VERSION }} | ||
- -X pkg/version.GitCommit={{ .Commit }} | ||
- -X pkg/version.BuildDate={{ .Env.BUILD_DATE }} | ||
- -s | ||
- -w | ||
goos: | ||
- darwin | ||
# - windows | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
# ignore: | ||
# - goos: windows | ||
# goarch: arm64 | ||
|
||
archives: | ||
- format: tar.gz | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- .Env.VERSION }}_ | ||
{{- .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
files: | ||
- none* | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
checksum: | ||
name_template: "sha256sums.txt" | ||
algorithm: sha256 | ||
|
||
changelog: | ||
sort: asc | ||
use: github | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- '^revert:' | ||
- '^chore:' | ||
- typo | ||
- Merge pull request | ||
- Merge branch | ||
- go mod tidy | ||
groups: | ||
- title: Features | ||
regexp: "^.*feat[(\\w)]*:+.*$" | ||
order: 0 | ||
- title: 'Bug fixes' | ||
regexp: "^.*fix[(\\w)]*:+.*$" | ||
order: 1 | ||
- title: Others | ||
order: 999 | ||
|
||
release: | ||
prerelease: auto | ||
mode: replace | ||
replace_existing_artifacts: true | ||
header: | | ||
## {{ tolower .ProjectName }} {{ .Tag }} | ||
Welcome to this new release! | ||
footer: | | ||
## Thanks! | ||
Those were the changes on {{ .Tag }}! |