-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yaml
39 lines (38 loc) · 1.3 KB
/
.goreleaser.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# .goreleaser.yml
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
goarch:
- amd64
- arm64
hooks:
pre:
- cmd: go mod tidy
- cmd: go mod verify
post:
- cmd: ditto -c -k {{ .Path }} {{ trimsuffix .Path ".exe" }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.zip
- cmd: aws s3 cp {{ trimsuffix .Path ".exe" }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.zip s3://{{ .Env.BUCKET_NAME }}/ --acl {{ .Env.BUCKET_ACL }}
- id: "mac"
goos:
- darwin
goarch:
- amd64
- arm64
hooks:
# Code signing for macOS binaries
post:
- cmd: codesign --options runtime --timestamp --sign "{{ .Env.APPLE_DEV_CERT_NAME }}" {{ .Path }}
- cmd: ditto -c -k --keepParent {{ .Path }} {{ .Path }}.zip
- cmd: xcrun notarytool submit {{ .Path }}.zip --apple-id {{ .Env.APPLE_ID }} --password {{ .Env.APPLE_APP_PASSWORD }} --team-id {{ .Env.APPLE_TEAM_ID }} --wait
- cmd: rm -rf {{ .Path }}.zip
- cmd: ditto -c -k {{ .Path }} {{ .Path }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.zip
- cmd: aws s3 cp {{ .Path }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.zip s3://{{ .Env.BUCKET_NAME }}/ --acl {{ .Env.BUCKET_ACL }}
release:
draft: false
archives:
- format_overrides:
- goos: windows
format: zip