Skip to content

Commit

Permalink
fix: Fix broken macos build.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Dec 20, 2023
1 parent da8992f commit cfd0bc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,20 @@ async function installBinaryen() {
core.info('Installing WebAssembly binaryen');

let platform = 'linux';
let arch = 'x86_64';

if (process.platform === 'darwin') {
platform = 'macos';
} else if (process.platform === 'win32') {
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'));

Expand All @@ -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';
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit cfd0bc6

Please sign in to comment.