diff --git a/index.ts b/index.ts index 449f81f..48b1084 100644 --- a/index.ts +++ b/index.ts @@ -27,6 +27,7 @@ async function installBinaryen() { core.info('Installing WebAssembly binaryen'); let platform = 'linux'; + let arch = 'x86_64'; if (process.platform === 'darwin') { platform = 'macos'; @@ -34,8 +35,12 @@ async function installBinaryen() { platform = 'windows'; } + if (process.arch === 'arm64') { + arch = 'arm64'; + } + const downloadFile = await tc.downloadTool( - `https://github.com/WebAssembly/binaryen/releases/download/version_${BINARYEN_VERSION}/binaryen-version_${BINARYEN_VERSION}-x86_64-${platform}.tar.gz`, + `https://github.com/WebAssembly/binaryen/releases/download/version_${BINARYEN_VERSION}/binaryen-version_${BINARYEN_VERSION}-${arch}-${platform}.tar.gz`, ); const extractedDir = await tc.extractTar(downloadFile, path.join(os.homedir(), 'binaryen')); @@ -49,7 +54,7 @@ async function installWabt() { let platform = 'ubuntu'; if (process.platform === 'darwin') { - platform = 'macos'; + platform = 'macos-12'; } else if (process.platform === 'win32') { platform = 'windows'; } diff --git a/package.json b/package.json index b4e1394..1aa9d91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@moonrepo/build-proto-plugin", - "version": "0.1.2", + "version": "0.1.3", "description": "A GitHub action to build, optimize, and prepare proto WASM plugins for release.", "main": "dist/index.js", "scripts": {