chore: use rosetta to build for intel macs
This commit is contained in:
parent
694e6197d9
commit
02447b617d
2 changed files with 26 additions and 2 deletions
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
|
|
@ -18,11 +18,35 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
arch: [arm64, x64]
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.arch == 'x64' && 'arch -x86_64 /bin/bash -e {0}' || 'bash' }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Verify architecture
|
||||
run: |
|
||||
CURRENT_ARCH=$(uname -m)
|
||||
echo "Current shell architecture: $CURRENT_ARCH"
|
||||
echo "Target architecture: ${{ matrix.arch }}"
|
||||
echo "Arch command output: $(arch)"
|
||||
|
||||
if [[ "${{ matrix.arch }}" == "x64" ]]; then
|
||||
if [[ "$CURRENT_ARCH" != "x86_64" ]]; then
|
||||
echo "ERROR: Expected x86_64 architecture but got $CURRENT_ARCH"
|
||||
exit 1
|
||||
fi
|
||||
echo "✓ Architecture verified: Running as x86_64 under Rosetta"
|
||||
elif [[ "${{ matrix.arch }}" == "arm64" ]]; then
|
||||
if [[ "$CURRENT_ARCH" != "arm64" ]]; then
|
||||
echo "ERROR: Expected arm64 architecture but got $CURRENT_ARCH"
|
||||
exit 1
|
||||
fi
|
||||
echo "✓ Architecture verified: Running as native arm64"
|
||||
fi
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
|
|
@ -60,7 +84,7 @@ jobs:
|
|||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
CODESIGNING_IDENTITY: ${{ secrets.CODESIGNING_IDENTITY }}
|
||||
run: |
|
||||
# Now make the distributables
|
||||
echo "Building ${{ matrix.arch }} artifacts"
|
||||
pnpm make:${{ matrix.arch }}
|
||||
|
||||
- name: Get version from package.json
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue