Skip to content

Commit

Permalink
Merge pull request #79 from ottijp/add-apple-silicon-support
Browse files Browse the repository at this point in the history
Add apple silicon support
  • Loading branch information
ottijp authored Nov 15, 2022
2 parents f788273 + 57b631b commit 37461bf
Show file tree
Hide file tree
Showing 4 changed files with 687 additions and 418 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
tags: 'v*'

jobs:
buidl:
build:
name: Create release
runs-on: macos-latest

Expand All @@ -22,31 +22,42 @@ jobs:
run: yarn

- name: Build binary for mac
run: yarn electron:build:mac
run: yarn electron:build:mac --publish never

- name: Build binary for win
run: yarn electron:build:win
run: yarn electron:build:win --publish never

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false

- name: Upload Release Asset (mac)
id: upload-release-asset_mac
- name: Upload Release Asset (intel mac)
id: upload-release-asset_mac_intel
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist_electron/MarkuPrev.dmg
asset_name: MarkuPrev.dmg
asset_path: ./dist_electron/MarkuPrev-${{ github.ref_name }}-x64.dmg
asset_name: MarkuPrev-${{ github.ref_name }}-x64.dmg
asset_content_type: application/octet-stream

- name: Upload Release Asset (apple silicon mac)
id: upload-release-asset_mac_apple_silicon
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist_electron/MarkuPrev-${{ github.ref_name }}-arm64.dmg
asset_name: MarkuPrev-${{ github.ref_name }}-arm64.dmg
asset_content_type: application/octet-stream

- name: Upload Release Asset (win)
Expand All @@ -56,7 +67,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist_electron/MarkuPrev.exe
asset_name: MarkuPrev.exe
asset_path: ./dist_electron/MarkuPrev-${{ github.ref_name }}-x64.exe
asset_name: MarkuPrev-${{ github.ref_name }}-x64.exe
asset_content_type: application/octet-stream

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@vue/cli-service": "~5.0.8",
"@vue/eslint-config-airbnb": "^7.0.0",
"electron": "^21.1.1",
"electron-builder": "^22.2.0",
"electron-devtools-installer": "^3.2.0",
"eslint": "^8.25.0",
"eslint-plugin-import": "^2.26.0",
Expand Down
15 changes: 9 additions & 6 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,26 @@ module.exports = {
},
builderOptions: {
appId: 'biz.sakao.markuprev',
/* eslint-disable-next-line no-template-curly-in-string */
artifactName: '${productName}-v${version}-${arch}.${ext}',
win: {
target: {
target: 'portable',
arch: [
'x64',
'ia32',
],
},
icon: 'src/assets/icon.png',
// eslint-disable-next-line no-template-curly-in-string
artifactName: '${productName}.${ext}',
},
mac: {
target: 'dmg',
target: {
target: 'dmg',
arch: [
'x64',
'arm64',
],
},
icon: 'src/assets/icon.png',
// eslint-disable-next-line no-template-curly-in-string
artifactName: '${productName}.${ext}',
},
},
},
Expand Down
Loading

0 comments on commit 37461bf

Please sign in to comment.