AikidoSec-safe-chain/.github/workflows/create-artifact.yml
2025-11-28 11:06:43 +01:00

71 lines
1.7 KiB
YAML

name: Create binaries
on: pull_request
jobs:
create-binaries:
name: Create binary for ${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- os: macos
arch: x64
runner: macos-15-intel
target: node22-macos-x64
extension: ""
- os: macos
arch: arm64
runner: macos-latest
target: node22-macos-arm64
extension: ""
- os: linux
arch: x64
runner: ubuntu-latest
target: node22-linux-x64
extension: ""
- os: linux
arch: arm64
runner: ubuntu-24.04-arm
target: node22-linux-arm64
extension: ""
- os: win
arch: x64
runner: windows-latest
target: node22-win-x64
extension: ".exe"
- os: win
arch: arm64
runner: windows-11-arm
target: node22-win-arm64
extension: ".exe"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "22.x"
- name: Setup safe-chain
run: |
npm i -g @aikidosec/safe-chain pkg
safe-chain setup-ci
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Create binary
run: |
node build.js ${{ matrix.target }}
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: safe-chain-${{ matrix.os }}-${{ matrix.arch }}
path: dist/*