From 5e76d283179b0d639b0fbf121e1ffe5654a28d09 Mon Sep 17 00:00:00 2001 From: Carl Javier Date: Thu, 31 Aug 2023 16:28:51 +1000 Subject: [PATCH] Add universal binaries --- .github/workflows/release.yml | 5 ++--- .goreleaser.yaml | 22 +++++++++++++++++----- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 52baf08..7799a8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,8 +42,7 @@ jobs: AC_PASSWORD: ${{ secrets.APPLE_PASSWORD }} AC_TEAMID: ${{ secrets.AC_TEAMID }} MACOS_CERTIFICATE_NAME: ${{ secrets.MACOS_CERTIFICATE_NAME }} - DIST_FILE_ARM64: dist/hava_darwin_arm64/hava - DIST_FILE_AMD64: dist/hava_darwin_amd64_v1/hava + DIST_FILE_ARM64: dist/hava_darwin_all/hava run: | # create variables CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 @@ -96,7 +95,7 @@ jobs: xcrun notarytool submit "./${DIST_FILE_ARM64}--macos-x64--${{ github.sha }}.zip" --keychain-profile "notarytool-profile" --wait # Delete build keychain - security delete-keychain build.keychain + security delete-keychain $KEYCHAIN_PATH - diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b49d3b1..5eda191 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -12,19 +12,31 @@ builds: id: hava env: - CGO_ENABLED=0 - goos: - - linux - - windows - - darwin ldflags: - -X github.com/teamhava/hava/version.Version={{.Version}} - -X github.com/teamhava/hava/version.Build={{.Tag}} - -X github.com/teamhava/hava/version.BuiltBy=goreleaser - -X github.com/teamhava/hava/version.Date={{.Date}} + ignore: + - goos: linux + goarch: 386 + - goos: windows + goarch: 386 + targets: + # Since: v1.9 + - go_first_class + # Since: v1.9 + - go_118_first_class + - linux_amd64_v1 + - darwin_arm64 + - linux_arm_6 +universal_binaries: + - replace: true + # dockers: # - image_templates: -# - teamhava/hava +# - hava/cli archives: - format: tar.gz