coscli icon indicating copy to clipboard operation
coscli copied to clipboard

feat: support for M1 and Linux ARM platform and auto release when push tag

Open yuyicai opened this issue 1 year ago • 0 comments

fix: #37

  • use goreleaser to cross-compile and release when push a tag
    • https://goreleaser.com/quick-start/
    • https://github.com/goreleaser/goreleaser-action
    # build on local pc
    go install github.com/goreleaser/goreleaser@latest
    goreleaser release --snapshot --clean
    
  • inject version when build instead of version hardcode
     go build -ldflags "-s -w -X coscli/cmd.version=$(git describe --tags --abbrev=0)"
    
  • when pushed a tag, the release result is as follows: https://github.com/yuyicai/coscli/releases/tag/v0.13.0-beta2 image

yuyicai avatar Apr 26 '23 11:04 yuyicai