diff --git a/.gitignore b/.gitignore index 28ca4a0..c68230e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ brewbot steps_output.txt .vscode/ bottle_output.txt + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..16bcb98 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,61 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +project_name: clisso +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... +builds: + - id: other + binary: clisso + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + goarm: + - "6" + - "7" + - id: macos-amd64 + binary: clisso + goos: + - darwin + goarch: + - "amd64" + hooks: + post: gon gon-amd64.json + - id: macos-arm64 + binary: clisso + goos: + - darwin + goarch: + - "arm64" + hooks: + post: gon gon-arm64.json + +archives: + - format: zip + name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" + +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + + +brews: + - tap: + owner: allcloud-io + name: homebrew-tools + branch: master + +env_files: + github_token: ~/.goreleaser \ No newline at end of file diff --git a/gon-amd64.json b/gon-amd64.json index 0d1d443..79ce4dd 100644 --- a/gon-amd64.json +++ b/gon-amd64.json @@ -1,6 +1,6 @@ { "source": [ - "./build/clisso-darwin-amd64" + "./dist/macos-amd64_darwin_amd64/clisso" ], "bundle_id": "io.allcloud.clisso", "apple_id": { @@ -10,6 +10,6 @@ "application_identity": "5791D17F2B7A187DD559F87F7631BD8F934B4204" }, "zip": { - "output_path": "./assets/clisso-darwin-amd64.zip" + "output_path": "./dist/macos-amd64_darwin_amd64/clisso.zip" } } \ No newline at end of file diff --git a/gon-arm64.json b/gon-arm64.json index 79653ba..0dd53b1 100644 --- a/gon-arm64.json +++ b/gon-arm64.json @@ -1,6 +1,6 @@ { "source": [ - "./build/clisso-darwin-arm64" + "./dist/macos-arm64_darwin_arm64/clisso" ], "bundle_id": "io.allcloud.clisso", "apple_id": { @@ -10,6 +10,6 @@ "application_identity": "5791D17F2B7A187DD559F87F7631BD8F934B4204" }, "zip": { - "output_path": "./assets/clisso-darwin-arm64.zip" + "output_path": "./dist/macos-arm64_darwin_arm64/clisso.zip" } } \ No newline at end of file