diff --git a/.github/workflows/create-artifact.yml b/.github/workflows/create-artifact.yml index 1ce0a53..8684ac7 100644 --- a/.github/workflows/create-artifact.yml +++ b/.github/workflows/create-artifact.yml @@ -63,7 +63,7 @@ jobs: - name: Create binary run: | node build.js ${{ matrix.target }} - pkg ./build/package.json -t ${{ matrix.target }} + pkg ./build/package.json - name: Upload binary artifact uses: actions/upload-artifact@v4 diff --git a/build.js b/build.js index 7868390..b15b936 100644 --- a/build.js +++ b/build.js @@ -15,7 +15,7 @@ if (!target) { await clearOutputFolder(); await bundleSafeChain(); await copyShellScripts(); - await copyAndModifyPackageJson(); + await copyAndModifyPackageJson(target); // await buildSafeChainBinary(target); })(); @@ -42,7 +42,7 @@ async function copyShellScripts() { { recursive: true } ); } -async function copyAndModifyPackageJson() { +async function copyAndModifyPackageJson(target) { const packageJsonContent = await readFile( "./packages/safe-chain/package.json", "utf-8" @@ -62,6 +62,7 @@ async function copyAndModifyPackageJson() { packageJson.pkg = { outputPath: "dist", assets: ["node_modules/certifi/**/*", "bin/startup-scripts/**/*"], + targets: [target], }; await writeFile("./build/package.json", JSON.stringify(packageJson, null, 2));