-
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 (#445)
* ci: switch to goreleaser for publishing release Signed-off-by: Lin Yang <[email protected]> * fix: release notes Signed-off-by: Lin Yang <[email protected]> * fix: generate-cli-chart Signed-off-by: Lin Yang <[email protected]> * fix: goreleaser config Signed-off-by: Lin Yang <[email protected]> * feat: add debug Signed-off-by: Lin Yang <[email protected]> * refactor: add debug message Signed-off-by: Lin Yang <[email protected]> * feat: use goreleaser name template func Signed-off-by: Lin Yang <[email protected]> * fix: a typo Signed-off-by: Lin Yang <[email protected]> * feat: use goreleaser name template func Signed-off-by: Lin Yang <[email protected]> * feat: add zip archives Signed-off-by: Lin Yang <[email protected]> * fix: config Signed-off-by: Lin Yang <[email protected]> --------- Signed-off-by: Lin Yang <[email protected]>
- Loading branch information
1 parent
1466dfa
commit 165aab0
Showing
4 changed files
with
105 additions
and
76 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,96 @@ | ||
# 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 | ||
|
||
# Global environment variables for builds. | ||
env: | ||
- CGO_ENABLED=0 | ||
- GO111MODULE=on | ||
|
||
before: | ||
hooks: | ||
- go mod download | ||
- make generate-cli-chart | ||
|
||
builds: | ||
# fsm build steps | ||
- id: fsm | ||
main: ./cmd/cli | ||
binary: fsm | ||
mod_timestamp: "{{ .CommitTimestamp }}" | ||
ldflags: &build-ldflags | ||
- -X {{ .GitURL }}/pkg/version.Version={{ .Env.VERSION }} | ||
- -X {{ .GitURL }}/pkg/version.GitCommit={{ .FullCommit }} | ||
- -X {{ .GitURL }}/pkg/version.BuildDate={{ .Now.Format "2006-01-02-15:04" }} | ||
- -s | ||
- -w | ||
goos: | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
|
||
|
||
archives: | ||
- id: tar-gz | ||
format: tar.gz | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- .Env.VERSION }}_ | ||
{{- .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
- id: zip | ||
format: zip | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- .Env.VERSION }}_ | ||
{{- .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
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 }}! |
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