mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Build safe-chain binaries in build.js
This commit is contained in:
parent
832708299f
commit
8c2e8c9597
2 changed files with 10 additions and 7 deletions
3
.github/workflows/create-artifact.yml
vendored
3
.github/workflows/create-artifact.yml
vendored
|
|
@ -54,7 +54,7 @@ jobs:
|
|||
|
||||
- name: Setup safe-chain
|
||||
run: |
|
||||
npm i -g @aikidosec/safe-chain @yao-pkg/pkg
|
||||
npm i -g @aikidosec/safe-chain
|
||||
safe-chain setup-ci
|
||||
|
||||
- name: Install dependencies
|
||||
|
|
@ -63,7 +63,6 @@ jobs:
|
|||
- name: Create binary
|
||||
run: |
|
||||
node build.js ${{ matrix.target }}
|
||||
pkg ./build/package.json --output "./dist/safe-chain${{ matrix.extension }}"
|
||||
|
||||
- name: Upload binary artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
|
|||
10
build.js
10
build.js
|
|
@ -16,7 +16,7 @@ if (!target) {
|
|||
await bundleSafeChain();
|
||||
await copyShellScripts();
|
||||
await copyAndModifyPackageJson(target);
|
||||
// await buildSafeChainBinary(target);
|
||||
await buildSafeChainBinary(target);
|
||||
})();
|
||||
|
||||
async function clearOutputFolder() {
|
||||
|
|
@ -74,10 +74,14 @@ function buildSafeChainBinary(target) {
|
|||
// eslint-disable-next-line no-console
|
||||
console.error("Target: " + target);
|
||||
return new Promise((resolve, reject) => {
|
||||
const pkg = spawn("pkg", ["./build/package.json", "-t", target], {
|
||||
const pkg = spawn(
|
||||
"npx",
|
||||
["@yao-pkg/pkg", "./build/package.json", "-t", target],
|
||||
{
|
||||
stdio: "inherit",
|
||||
shell: true,
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
pkg.on("close", (code) => {
|
||||
if (code !== 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue