From 02447b617dd26a5a8277f7088d3e74fbb56a5f7b Mon Sep 17 00:00:00 2001 From: haritabh-z01 Date: Tue, 12 Aug 2025 06:33:35 +0530 Subject: [PATCH] chore: use rosetta to build for intel macs --- .github/workflows/release.yml | 26 +++++++++++++++++++++++++- apps/desktop/package.json | 2 +- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68b4606..42bcd8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 3aeda17..5b37d1f 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@amical/desktop", - "version": "0.0.7", + "version": "0.0.7-intel-test", "description": "Amical Desktop app", "main": ".vite/build/main.js", "productName": "Amical",