enh: arm workflow

This commit is contained in:
Timothy Jaeryang Baek
2025-01-14 01:46:21 -08:00
parent 7048bb0a46
commit 2803d0fdb0

View File

@@ -4,14 +4,23 @@ on:
branches: branches:
- main - main
pull_request: pull_request:
jobs: jobs:
build: build:
name: Build and Package name: Build and Package
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest, macos-latest] include:
- os: ubuntu-latest
arch: x64
- os: ubuntu-latest
arch: arm64
- os: windows-latest
arch: x64
- os: macos-latest
arch: x64
- os: macos-latest
arch: arm64
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -20,6 +29,7 @@ jobs:
with: with:
node-version: 22 node-version: 22
cache: 'npm' cache: 'npm'
architecture: ${{ matrix.arch }}
- name: Install Dependencies - name: Install Dependencies
run: npm ci run: npm ci
- name: Create Packaged Python - name: Create Packaged Python
@@ -31,13 +41,12 @@ jobs:
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Zip Artifacts - name: Zip Artifacts
run: | run: |
7z a -tzip ${{ matrix.os }}-${{ steps.slug.outputs.sha8 }}.zip ./out/make/* 7z a -tzip ${{ matrix.os }}-${{ matrix.arch }}-${{ steps.slug.outputs.sha8 }}.zip ./out/make/*
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ matrix.os }}-${{ steps.slug.outputs.sha8 }} name: ${{ matrix.os }}-${{ matrix.arch }}-${{ steps.slug.outputs.sha8 }}
path: ${{ matrix.os }}-${{ steps.slug.outputs.sha8 }}.zip path: ${{ matrix.os }}-${{ matrix.arch }}-${{ steps.slug.outputs.sha8 }}.zip
release: release:
needs: build needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest