diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index 2395856..b3287f6 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -18,11 +18,23 @@ jobs: - name: Checkout branch uses: actions/checkout@v2 - - name: Setup Node + - name: Install Rosetta on macOS (ARM64) + if: runner.os == 'macOS' && runner.arch == 'ARM64' + run: | + softwareupdate --install-rosetta --agree-to-license + + - name: Setup Node.js (x86_64 through Rosetta on macOS ARM64) + if: runner.os == 'macOS' && runner.arch == 'ARM64' + run: | + arch -x86_64 /bin/bash -c "$(curl -fsSL https://nodejs.org/dist/v14.18.1/node-v14.18.1-darwin-x64.tar.gz | tar -xz)" + export PATH=$(pwd)/node-v14.18.1-darwin-x64/bin:$PATH + + - name: Setup Node.js (Standard) + if: runner.os != 'macOS' || runner.arch != 'ARM64' uses: actions/setup-node@v1 with: node-version: '14.x' - + - name: Get package version uses: actions/github-script@v6 id: version