📦 Chore: mas build

This commit is contained in:
萌萌哒赫萝 2023-03-09 17:30:46 +08:00
parent ab03867dac
commit e912568e5d
6 changed files with 65 additions and 5 deletions

View File

@ -52,6 +52,7 @@ jobs:
run: | run: |
yarn yarn
yarn global add xvfb-maybe yarn global add xvfb-maybe
npm rebuild --platform=darwin --arch=arm64 sharp
- name: Build & release app - name: Build & release app
run: | run: |

1
.gitignore vendored
View File

@ -4,6 +4,7 @@ dist/web/*
build/* build/*
!build/icons !build/icons
!build/installer.nsh !build/installer.nsh
!build/*.plist
coverage coverage
node_modules/ node_modules/
npm-debug.log npm-debug.log

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.inherit</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>GDW4YTJP22.com.kuingsmile.piclist</string>
</array>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.files.bookmarks.app-scope</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.print</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.microphone</key>
<true/>
<key>com.apple.security.device.usb</key>
<true/>
</dict>
</plist>

View File

@ -67,18 +67,30 @@ const config = {
}, },
mac: { mac: {
icon: 'build/icons/icon.icns', icon: 'build/icons/icon.icns',
hardenedRuntime: true,
entitlements: 'build/entitlements.mas.plist',
entitlementsInherit: 'build/entitlements.mas.inherit.plist',
provisioningProfile: 'build/piclistmass.provisionprofile',
extendInfo: { extendInfo: {
LSUIElement: 1 LSUIElement: 1
}, },
target: [{ target: [{
target: 'dmg', target: 'mas',
arch: [ arch: [
'x64', 'universal'
'arm64'
] ]
}], }],
// eslint-disable-next-line no-template-curly-in-string // eslint-disable-next-line no-template-curly-in-string
artifactName: 'PicList-${version}-${arch}.dmg' artifactName: 'PicList-${version}-${arch}.${ext}'
},
mas: {
type: 'distribution',
icon: 'build/icons/icon.icns',
hardenedRuntime: true,
entitlements: 'build/entitlements.mas.plist',
entitlementsInherit: 'build/entitlements.mas.inherit.plist',
provisioningProfile: 'build/piclistmass.provisionprofile',
entitlementsLoginHelper: "build/entitlements.mas.loginhelper.plist"
}, },
win: { win: {
icon: 'build/icons/icon.ico', icon: 'build/icons/icon.ico',