Skip to content

Commit

Permalink
goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
bitte-ein-bit committed Jan 18, 2022
1 parent 6ca0db7 commit fa2511c
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ brewbot
steps_output.txt
.vscode/
bottle_output.txt

dist/
61 changes: 61 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions gon-amd64.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": [
"./build/clisso-darwin-amd64"
"./dist/macos-amd64_darwin_amd64/clisso"
],
"bundle_id": "io.allcloud.clisso",
"apple_id": {
Expand All @@ -10,6 +10,6 @@
"application_identity": "5791D17F2B7A187DD559F87F7631BD8F934B4204"
},
"zip": {
"output_path": "./assets/clisso-darwin-amd64.zip"
"output_path": "./dist/macos-amd64_darwin_amd64/clisso.zip"
}
}
4 changes: 2 additions & 2 deletions gon-arm64.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": [
"./build/clisso-darwin-arm64"
"./dist/macos-arm64_darwin_arm64/clisso"
],
"bundle_id": "io.allcloud.clisso",
"apple_id": {
Expand All @@ -10,6 +10,6 @@
"application_identity": "5791D17F2B7A187DD559F87F7631BD8F934B4204"
},
"zip": {
"output_path": "./assets/clisso-darwin-arm64.zip"
"output_path": "./dist/macos-arm64_darwin_arm64/clisso.zip"
}
}

0 comments on commit fa2511c

Please sign in to comment.