Skip to content

Commit

Permalink
📦 Chore: add mac-arm64 build support
Browse files Browse the repository at this point in the history
  • Loading branch information
Molunerfinn committed Jan 5, 2022
1 parent 34b3656 commit f2a4197
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-10.15]
os: [ubuntu-latest, macos-12]

# create steps
steps:
Expand All @@ -50,6 +50,7 @@ jobs:
- name: Build & release app
run: |
npm run release
yarn build --arm64
yarn release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ build_script:
- yarn build --win --ia32
- yarn release

test: off
test: false
2 changes: 0 additions & 2 deletions src/main/apis/gui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
Notification,
ipcMain
} from 'electron'
import path from 'path'
import db, { GalleryDB } from 'apis/core/datastore'
import { dbPathChecker, defaultConfigPath, getGalleryDBPath } from 'apis/core/datastore/dbChecker'
import uploader from 'apis/app/uploader'
Expand All @@ -18,7 +17,6 @@ import {
SHOW_INPUT_BOX
} from '~/universal/events/constants'
import { DBStore } from '@picgo/store'
type PromiseResType<T> = T extends Promise<infer R> ? R : T

// Cross-process support may be required in the future
class GuiApi implements IGuiApi {
Expand Down
2 changes: 2 additions & 0 deletions src/universal/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,3 +333,5 @@ interface IMiniWindowPos {
height: number,
width: number
}

type PromiseResType<T> = T extends Promise<infer R> ? R : T
8 changes: 7 additions & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ function resolve (dir) {
}

const arch = process.argv.includes('--ia32') ? 'ia32' : 'x64'
const macArch = process.argv.includes('--arm64') ? 'arm64' : 'x64'

const config = {
configureWebpack: {
Expand Down Expand Up @@ -65,7 +66,12 @@ const config = {
icon: 'build/icons/icon.icns',
extendInfo: {
LSUIElement: 1
}
},
target: [{
target: 'dmg',
arch: macArch
}],
artifactName: `PicGo-\${version}-${macArch}.dmg`
},
win: {
icon: 'build/icons/icon.ico',
Expand Down

0 comments on commit f2a4197

Please sign in to comment.