Skip to content

Commit

Permalink
create mac arch64 package. (#1159)
Browse files Browse the repository at this point in the history
NOTE: for zap-cli binary, the mac x86 binary is used for the arch64 package
      as a workaround since pkg, the build tool, does not official support for mac-arch64 yet.
  • Loading branch information
Jing T authored Oct 4, 2023
1 parent bc2ca3c commit 949918d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,12 @@ jobs:
with:
name: zap-mac-x64-zip
path: dist/zap-mac-x64.zip
- name: Archive macOS arm64 .zip file
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'macos')
with:
name: zap-mac-arm64-zip
path: dist/zap-mac-arm64.zip
- name: Archive Linux (x64) .zip file
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'ubuntu')
Expand Down Expand Up @@ -460,4 +466,4 @@ jobs:
with:
generateReleaseNotes: true
prerelease: ${{ endsWith(github.ref, 'nightly') }}
artifacts: 'zap-linux-x64-deb/zap-linux-x64.deb, zap-linux-x64-rpm/zap-linux-x64.rpm, zap-linux-x64-zip/zap-linux-x64.zip, zap-linux-arm64-zip/zap-linux-arm64.zip, zap-mac-x64-zip/zap-mac-x64.zip, zap-win-x64-zip/zap-win-x64.zip, zap-win-arm64-zip/zap-win-arm64.zip'
artifacts: 'zap-linux-x64-deb/zap-linux-x64.deb, zap-linux-x64-rpm/zap-linux-x64.rpm, zap-linux-x64-zip/zap-linux-x64.zip, zap-linux-arm64-zip/zap-linux-arm64.zip, zap-mac-x64-zip/zap-mac-x64.zip, zap-mac-arm64-zip/zap-mac-arm64.zip, zap-win-x64-zip/zap-win-x64.zip, zap-win-arm64-zip/zap-win-arm64.zip'
5 changes: 5 additions & 0 deletions src-script/pack-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ async function main() {
await rename(`${file}`, cli)
await addToZip(`zap-mac-x64.zip`, cli)

// NOTE: `pkg` build tool does not officially support building for mac arch64 yet.
// until official support is out, x86 version will be packaged as
// Apple Rosetta will kick in.
await addToZip(`zap-mac-arm64.zip`, cli)

// NOTE: pkg support for macos-arm64 is experimental
// await rename(`${file}-arm64`, cli)
// await addToZip(`${file}-arm64.zip`, cli)
Expand Down

0 comments on commit 949918d

Please sign in to comment.