Change how we build, hoping it'll fix macOS

This commit is contained in:
Felix Rieseberg
2022-06-25 22:29:26 -07:00
parent a7ae665adc
commit e5d897c663

View File

@@ -28,16 +28,32 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-yarn- ${{ runner.os }}-yarn-
- name: Install - name: Install
run: yarn run: yarn --frozen-lockfile
- name: lint - name: lint
run: yarn lint run: yarn lint
build: build:
needs: lint needs: lint
name: Build (${{ matrix.os }}) name: Build (${{ matrix.os }} - ${{ matrix.arch }})
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
# Build for supported platforms
# https://github.com/electron/electron-packager/blob/ebcbd439ff3e0f6f92fa880ff28a8670a9bcf2ab/src/targets.js#L9
# 32-bit Linux unsupported as of 2019: https://www.electronjs.org/blog/linux-32bit-support
os: [ macOS-latest, ubuntu-latest, windows-latest ] os: [ macOS-latest, ubuntu-latest, windows-latest ]
arch: [ x64, arm64 ]
include:
- os: windows-latest
arch: ia32
- os: ubuntu-latest
arch: armv7l
# Publishing artifacts for multiple Windows architectures has
# a bug which can cause the wrong architecture to be downloaded
# for an update, so until that is fixed, only build Windows x64
exclude:
- os: windows-latest
arch: arm64
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js
@@ -81,32 +97,15 @@ jobs:
DISK_URL: ${{ secrets.DISK_URL }} DISK_URL: ${{ secrets.DISK_URL }}
- name: Install - name: Install
run: yarn run: yarn
- name: Make (Linux) - name: Make
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' if: startsWith(github.ref, 'refs/tags/')
run: yarn make run: yarn make --arch=${{ matrix.arch }}
- name: Make (Windows)
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows-latest'
run: yarn make --arch=all
env: env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WINDOWS_CODESIGN_FILE: ${{ steps.write_file.outputs.filePath }} WINDOWS_CODESIGN_FILE: ${{ steps.write_file.outputs.filePath }}
WINDOWS_CODESIGN_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_PASSWORD }} WINDOWS_CODESIGN_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_PASSWORD }}
- name: Make (macOS/x64)
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'macOS-latest'
run: yarn make --arch=x64
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
- name: Make (macOS/arm64)
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'macOS-latest'
run: yarn make --arch=arm64
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
# - name: Archive production artifacts
# uses: actions/upload-artifact@v2
# with:
# name: ${{ matrix.os }}
# path: out/make/**/*
- name: Release - name: Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')