Skip to content

Commit

Permalink
🧱 Upload signed binaries to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Oct 10, 2024
1 parent 86e02a5 commit 1a82a02
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cli/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@ builds:
fi;
fi"
output: true
- cmd: | # copy binaries to dist/upload for GitHub binary upload
sh -c "
set -e;
mkdir -p dist/upload;
cp {{ .Path }} dist/upload/{{ .ProjectName }}_{{ .Os }}_{{ if eq .Arch "amd64" }}x86_64{{ else }}{{ .Arch }}{{ end }}{{ if eq .Os "windows" }}.exe{{ end }}"
- cmd: | # sign binaries for Windows and macOS
sh -c "
set -e;
if [ '{{ .IsSnapshot }}' = 'false' -a '{{ .Os }}' != 'linux' ];
then codesign {{ if eq .Os "darwin" }}-denoted-content-type=application/x-mac-app-bin{{ end }} -signed-files-dir=./dist/{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if eq .Arch "amd64" }}_v1{{ end }}/ './dist/{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if eq .Arch "amd64" }}_v1{{ end }}/qodana{{ if eq .Os "windows" }}.exe{{ end }}' ;
fi"
fi;
mkdir -p dist/upload;
cp {{ .Path }} dist/upload/{{ .ProjectName }}_{{ .Os }}_{{ if eq .Arch "amd64" }}x86_64{{ else }}{{ .Arch }}{{ end }}{{ if eq .Os "windows" }}.exe{{ end }}"
output: true
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}'
Expand Down

0 comments on commit 1a82a02

Please sign in to comment.