From f88eb3354712b53c7948c4611feb97d1496a8b16 Mon Sep 17 00:00:00 2001
From: Saihajpreet Singh <saihajpreet.singh@gmail.com>
Date: Wed, 10 Jul 2024 15:36:49 -0400
Subject: [PATCH] ci: create builds for node versions and arm64 mac

---
 .github/workflows/publish-native-binaries.yml | 33 ++++++++++---------
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/publish-native-binaries.yml b/.github/workflows/publish-native-binaries.yml
index 2b05d46fa..7127fb444 100644
--- a/.github/workflows/publish-native-binaries.yml
+++ b/.github/workflows/publish-native-binaries.yml
@@ -4,11 +4,12 @@
 name: "Publish binaries"
 
 on:
-  workflow_dispatch:
-  release:
-    types:
-      - created
-      - published
+  pull_request: {}
+  # workflow_dispatch:
+  # release:
+  #   types:
+  #     - created
+  #     - published
 
 jobs:
   publish-github:
@@ -17,21 +18,21 @@ jobs:
       # (https://github.com/bchr02/node-pre-gyp-github/issues/42)
       fail-fast: false
       matrix:
-        node_version: [18, 19, 20]
+        node-version: [18, 20, 22]
         system:
+          - os: macos-11
+            target: x86_64-apple-darwin
           - os: macos-12
             target: x86_64-apple-darwin
+          - os: macos-13-xlarge # ARM https://github.com/actions/runner-images/blob/main/images/macos/macos-13-arm64-Readme.md
+            target: x86_64-apple-darwin
+          - os: macos-14 # ARM https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
+            target: x86_64-apple-darwin
+          - os: ubuntu-20.04
+            target: x86_64-unknown-linux-gnu
           - os: ubuntu-22.04
             target: x86_64-unknown-linux-gnu
-        include:
-          - node_version: 17
-            system:
-              os: ubuntu-20.04
-              target: x86_64-unknown-linux-gnu
-          - node_version: 17
-            system:
-              os: macos-11
-              target: x86_64-apple-darwin
+
     runs-on: ${{ matrix.system.os }}
     steps:
       - name: Checkout the repo
@@ -64,4 +65,4 @@ jobs:
           NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           CARGO_BUILD_TARGET: ${{ matrix.system.target }}
         working-directory: ./packages/indexer-native
-        run: yarn build-test-pack-publish
+        run: yarn build-release