From 2a161c058bcc11c8c15e0ccef63c084167de7f06 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Wed, 23 Aug 2023 02:56:31 -0400 Subject: [PATCH] ci: add action to build & upload binaries to a release --- .github/workflows/publish.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c2020e92..4d235715 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -101,3 +101,31 @@ jobs: git push origin --delete "v${{ env.current_version }}" || true git tag -a "v${{ env.current_version }}" -m "Version ${{ env.current_version }}" git push origin "v${{ env.current_version }}" + + prebuild: + if: ${{ github.event_name == 'release' }} + strategy: + matrix: + os: + - windows-2019 + - macos-latest + - ubuntu-latest + fail-fast: false + name: Prebuild for ${{ matrix.os }} + runs-on: ${{ matrix.os }} + needs: release + steps: + - uses: actions/checkout@v3 + with: + submodules: true + fetch-depth: 0 + - uses: actions/setup-node@v3 + with: + node-version: 20 + - run: npm install + - if: runner.os == 'macOS' + run: ${{ env.NODE_PREBUILD_CMD }} --arch arm64 + - if: runner.os == 'macOS' + run: ${{ env.ELECTRON_PREBUILD_CMD }} --arch arm64 + - run: ${{ env.NODE_PREBUILD_CMD }} + - run: ${{ env.ELECTRON_PREBUILD_CMD }}