From 6eee88eb0edc5d6f79f7632ddc2d6e57d2d165df Mon Sep 17 00:00:00 2001 From: JovannMC Date: Sat, 16 Nov 2024 19:26:00 +0300 Subject: [PATCH] use separate runners for macos arm and x64 --- .../{build-mac.yml => build-mac-arm64.yml} | 11 +----- .github/workflows/build-mac-x64.yml | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+), 10 deletions(-) rename .github/workflows/{build-mac.yml => build-mac-arm64.yml} (69%) create mode 100644 .github/workflows/build-mac-x64.yml diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac-arm64.yml similarity index 69% rename from .github/workflows/build-mac.yml rename to .github/workflows/build-mac-arm64.yml index 18ac534..d204220 100644 --- a/.github/workflows/build-mac.yml +++ b/.github/workflows/build-mac-arm64.yml @@ -5,7 +5,7 @@ on: branches: - main paths: - - ".github/workflows/build-mac.yml" + - ".github/workflows/build-mac-arm64.yml" - package.json workflow_dispatch: create: @@ -29,18 +29,9 @@ jobs: - name: Build the application run: npm run build - - name: Compress macOS build artifacts (x64) - run: zip -r build/SlimeTora-darwin-x64.zip build/SlimeTora-darwin-x64 - - name: Compress macOS build artifacts (arm64) run: zip -r build/SlimeTora-darwin-arm64.zip build/SlimeTora-darwin-arm64 - - name: Archive build artifacts for macOS (x64) - uses: actions/upload-artifact@v4 - with: - name: build-artifacts-macos-x64 - path: build/SlimeTora-darwin-x64.zip - - name: Archive build artifacts for macOS (arm64) uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build-mac-x64.yml b/.github/workflows/build-mac-x64.yml new file mode 100644 index 0000000..6eb8497 --- /dev/null +++ b/.github/workflows/build-mac-x64.yml @@ -0,0 +1,39 @@ +name: Build application (macOS) + +on: + push: + branches: + - main + paths: + - ".github/workflows/build-mac-x64.yml" + - package.json + workflow_dispatch: + create: + +jobs: + build: + runs-on: macos-13 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install Node.js dependencies + run: npm install + + - name: Build the application + run: npm run build + + - name: Compress macOS build artifacts (x64) + run: zip -r build/SlimeTora-darwin-x64.zip build/SlimeTora-darwin-x64 + + - name: Archive build artifacts for macOS (x64) + uses: actions/upload-artifact@v4 + with: + name: build-artifacts-macos-x64 + path: build/SlimeTora-darwin-x64.zip