mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 00:45:19 +00:00
Build universal macOS binaries for Orbit (#6208)
This commit is contained in:
parent
ed4ae18602
commit
12d915531e
2
.github/workflows/goreleaser-orbit.yaml
vendored
2
.github/workflows/goreleaser-orbit.yaml
vendored
@ -45,7 +45,7 @@ jobs:
|
||||
go-version: 1.18.2
|
||||
|
||||
- name: Run GoReleaser
|
||||
run: go run github.com/goreleaser/goreleaser@v1.1.0 release --rm-dist -f orbit/.goreleaser.yml
|
||||
run: go run github.com/goreleaser/goreleaser@v1.9.2 release --rm-dist -f orbit/.goreleaser.yml
|
||||
env:
|
||||
AC_USERNAME: ${{ secrets.APPLE_USERNAME }}
|
||||
AC_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Use default credentials from environment
|
||||
|
||||
notarize {
|
||||
path = "./dist/orbit_darwin_amd64.zip"
|
||||
path = "./dist/orbit-macos_darwin_all.zip"
|
||||
bundle_id = "com.fleetdm.orbit"
|
||||
}
|
||||
|
@ -11,7 +11,6 @@ builds:
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- darwin
|
||||
- linux
|
||||
- windows
|
||||
goarch:
|
||||
@ -22,9 +21,30 @@ builds:
|
||||
- -X github.com/fleetdm/fleet/v4/orbit/pkg/build.Version={{.Version}}
|
||||
- -X github.com/fleetdm/fleet/v4/orbit/pkg/build.Commit={{.Commit}}
|
||||
- -X github.com/fleetdm/fleet/v4/orbit/pkg/build.Date={{.Date}}
|
||||
|
||||
- id: orbit-macos
|
||||
dir: ./orbit/cmd/orbit/
|
||||
binary: orbit
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- -X github.com/fleetdm/fleet/v4/orbit/pkg/build.Version={{.Version}}
|
||||
- -X github.com/fleetdm/fleet/v4/orbit/pkg/build.Commit={{.Commit}}
|
||||
- -X github.com/fleetdm/fleet/v4/orbit/pkg/build.Date={{.Date}}
|
||||
|
||||
|
||||
universal_binaries:
|
||||
- replace: true
|
||||
id: orbit-macos
|
||||
hooks:
|
||||
post: ./orbit/tools/build/sign-macos.sh {{ .Path }}
|
||||
|
||||
archives:
|
||||
- id: orbit
|
||||
builds:
|
||||
@ -36,6 +56,11 @@ archives:
|
||||
- goos: windows
|
||||
format: zip
|
||||
|
||||
- id: orbit-macos
|
||||
builds:
|
||||
- orbit-macos
|
||||
name_template: orbit_{{.Version}}_macos
|
||||
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
|
||||
|
1
orbit/changes/universal-binary
Normal file
1
orbit/changes/universal-binary
Normal file
@ -0,0 +1 @@
|
||||
* Orbit is now a Universal Binary supporting Intel and M1 on macOS machines without Rosetta.
|
@ -21,7 +21,7 @@ then
|
||||
fi
|
||||
|
||||
codesign -s "$CODESIGN_IDENTITY" -i com.fleetdm.orbit -f -v --timestamp --options runtime "$1"
|
||||
zip -r dist/orbit_darwin_amd64 dist/orbit_darwin_amd64
|
||||
zip -r dist/orbit-macos_darwin_all dist/orbit-macos_darwin_all
|
||||
go run github.com/mitchellh/gon/cmd/gon orbit/.gon.hcl
|
||||
|
||||
echo "Signed successfully"
|
||||
|
Loading…
Reference in New Issue
Block a user