@@ -32,6 +32,7 @@ builds:
3232 - amd64
3333 hooks :
3434 post :
35+ # Signing
3536 - cmd : codesign -s "{{.Env.APPLE_APPLICATION_IDENTITY}}" -f -v --options=runtime "dist/macos-builds_{{.Target}}/{{.Name}}"
3637 output : true
3738 - cmd : codesign -vvv --deep --strict "dist/macos-builds_{{.Target}}/{{.Name}}"
@@ -46,12 +47,29 @@ builds:
4647 output : true
4748 - cmd : spctl -a -t open --context context:primary-signature -v dist/{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.dmg
4849 output : true
50+ # Completion files
51+ - cmd : mkdir -p dist/macos-builds_{{.Target}}/completions
52+ - cmd : sh -c './dist/macos-builds_{{.Target}}/{{.Name}} completion zsh > ./dist/macos-builds_{{.Target}}/completions/stackit.zsh'
53+ - cmd : sh -c './dist/macos-builds_{{.Target}}/{{.Name}} completion bash > ./dist/macos-builds_{{.Target}}/completions/stackit.bash'
54+ - cmd : sh -c './dist/macos-builds_{{.Target}}/{{.Name}} completion fish > ./dist/macos-builds_{{.Target}}/completions/stackit.fish'
4955
5056archives :
51- - formats : [ 'tar.gz' ]
57+ - ids :
58+ - linux-builds
59+ - windows-builds
60+ formats : [ 'tar.gz' ]
5261 format_overrides :
5362 - goos : windows
5463 formats : [ 'zip' ]
64+ - id : macos-archives
65+ ids :
66+ - macos-builds
67+ formats : [ 'tar.gz' ]
68+ files :
69+ - src : ./dist/macos-builds_{{.Target}}/completions/*
70+ dst : completions
71+ - LICENSE.md
72+ - README.md
5573
5674release :
5775 # If set to auto, the GitHub release will be marked as "Pre-release"
@@ -96,8 +114,11 @@ signs:
96114 " ${artifact}" ,
97115 ]
98116
99- brews :
117+ homebrew_casks :
100118 - name : stackit
119+ directory : Casks
120+ conflicts :
121+ - formula : stackit
101122 repository :
102123 owner : stackitcloud
103124 name : homebrew-tap
@@ -106,14 +127,14 @@ brews:
106127107128 homepage : " https://github.com/stackitcloud/stackit-cli"
108129 description : " A command-line interface to manage STACKIT resources.\n This CLI is in a beta state. More services and functionality will be supported soon."
109- directory : Formula
110130 license : " Apache-2.0"
111131 # If set to auto, the release will not be uploaded to the homebrew tap repo
112132 # if the tag has a prerelease indicator (e.g. v0.0.1-alpha1)
113133 skip_upload : auto
114- install : |
115- bin.install "stackit"
116- generate_completions_from_executable(bin/"stackit", "completion")
134+ completions :
135+ zsh : ./completions/stackit.zsh
136+ bash : ./completions/stackit.bash
137+ fish : ./completions/stackit.fish
117138
118139snapcrafts :
119140 # IDs of the builds for which to create packages for
0 commit comments