From 7f1710fb7302efe6a0f0dd6976ce43fe2dd0d9e7 Mon Sep 17 00:00:00 2001 From: Sander Declerck Date: Fri, 28 Nov 2025 11:17:28 +0100 Subject: [PATCH] Move target to package.json --- .github/workflows/create-artifact.yml | 2 +- build.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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));