From 13b5c265af12719288937433e384e82a3546b92f Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Wed, 2 Oct 2024 13:36:49 +0200 Subject: [PATCH] Build and publish macOS x64 --- .github/workflows/macos.yml | 42 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 23 +++++++++++++++++-- 2 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/macos.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000..ff513f8 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,42 @@ +on: + push: + workflow_dispatch: +name: "macos" +jobs: + build_macOS_aarch64: + name: Building macOS aarch64 + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Build binary + run: bash tool/build_macos.sh aarch64 + + - name: Upload binary + if: github.event_name == 'workflow_dispatch' + uses: ./.github/actions/upload + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + file-name: libpowersync_aarch64.dylib + tag: ${{ github.ref_name }} + + build_macOS_x64: + name: Building macOS x64 + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Build binary + run: bash tool/build_macos.sh x64 + + - name: Upload binary + if: github.event_name == 'workflow_dispatch' + uses: ./.github/actions/upload + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + file-name: libpowersync_x64.dylib + tag: ${{ github.ref_name }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d46812b..f75db75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -176,8 +176,8 @@ jobs: file-name: powersync_x64.dll tag: ${{ needs.draft_release.outputs.tag }} - publish_macOS: - name: Publish macOS + publish_macOS_aarch64: + name: Publish macOS aarch64 needs: [draft_release] runs-on: macos-latest steps: @@ -194,3 +194,22 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} file-name: libpowersync_aarch64.dylib tag: ${{ needs.draft_release.outputs.tag }} + + publish_macOS_x64: + name: Publish macOS x64 + needs: [draft_release] + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Build binary + run: bash tool/build_macos.sh x64 + + - name: Upload binary + uses: ./.github/actions/upload + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + file-name: libpowersync_x64.dylib + tag: ${{ needs.draft_release.outputs.tag }}