diff --git a/.github/workflows/package-npm.yml b/.github/workflows/package-npm.yml index 48ded85..12dea74 100644 --- a/.github/workflows/package-npm.yml +++ b/.github/workflows/package-npm.yml @@ -104,13 +104,16 @@ jobs: cd - > /dev/null done < <(find . -name grammar.js -not -path './node_modules/*' -not -path './.build/*') - name: Build x64 binary - run: npm x -- prebuildify --arch x64 -t 20.9.0 --strip - - name: Build arm64 binary - if: runner.os != 'Linux' - run: npm x -- prebuildify --arch arm64 -t 20.9.0 --strip - - name: Build arm64 binary + run: npm x -- prebuildify --arch x64 -t 20.9.0 + - name: Set up cross-compilation if: runner.os == 'Linux' - run: npm x -- prebuildify-cross -i linux-arm64 -t 20.9.0 --strip + run: |- + sudo apt-get update + sudo apt-get install g++-aarch64-linux-gnu + printf '%s\n' >> "$GITHUB_ENV" \ + 'CC=aarch64-linux-gnu-gcc' 'CXX=aarch64-linux-gnu-g++' + - name: Build arm64 binary + run: npm x -- prebuildify --arch arm64 -t 20.9.0 - name: Upload binaries uses: actions/upload-artifact@v4 with: