Skip to content

Commit

Permalink
Merge pull request #339 from HASEL-UZH/dev
Browse files Browse the repository at this point in the history
Update build
  • Loading branch information
SRichner authored Oct 29, 2024
2 parents 5b09f6b + 022a616 commit 3708999
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ jobs:
working-directory: src/electron
strategy:
matrix:
os: [ macos-latest, windows-latest ]
os: [windows-latest, macos-latest]
mac_arch: [arm64, x64]
include:
- os: windows-latest
- os: macos-latest
mac_arch: arm64
- os: macos-latest
mac_arch: x64
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -26,15 +33,19 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm ci
- name: Build
run: |
npm ci
- name: Build windows
run: npm run build
if: matrix.os == 'windows-latest'
- name: Build macos
run: npm run build
if: matrix.os == 'macos-latest'
if [ "${{ matrix.os }}" == "macos-latest" ]; then
if [ "${{ matrix.mac_arch }}" == "arm64" ]; then
npm run build:mac:arm64
else
npm run build:mac:x64
fi
else
npm run build
env:
MAC_ARCH_TYPE: ${{ matrix.mac_arch == 'arm64' && 'AppleSilicon' || 'Intel' }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
Expand Down
4 changes: 2 additions & 2 deletions src/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dev": "vite",
"build": "vue-tsc --noEmit && vite build && electron-builder --config electron-builder.config.cjs",
"build:mac": "npm run build:mac:arm64 && npm run build:mac:x64",
"build:mac:arm64": "export MAC_ARCH_TYPE=AppleSilicon && vue-tsc --noEmit && vite build && electron-builder --mac --arm64 --config electron-builder.config.cjs",
"build:mac:x64": "export MAC_ARCH_TYPE=Intel && vue-tsc --noEmit && vite build && electron-builder --mac --x64 --config electron-builder.config.cjs",
"build:mac:arm64": "vue-tsc --noEmit && vite build && electron-builder --mac --arm64 --config electron-builder.config.cjs",
"build:mac:x64": "vue-tsc --noEmit && vite build && electron-builder --mac --x64 --config electron-builder.config.cjs",
"build:win": "vue-tsc --noEmit && vite build && electron-builder --win --config electron-builder.config.cjs",
"postinstall": "electron-builder install-app-deps",
"preview": "vite preview",
Expand Down

0 comments on commit 3708999

Please sign in to comment.