samuelmeuli / action-electron-builder

:electron: GitHub Action for building and releasing Electron apps
MIT License
658 stars 201 forks source link

Cannot build macOS app #5

Closed kztmk closed 4 years ago

kztmk commented 4 years ago

Hi, samuelmeuli and wcatron; Thanks a lot for this Action.

I have error on github action. my action file is copy is https://github.com/samuelmeuli/mini-diary/blob/master/.github/workflows/release.yml

I changed

to

  - name: Build/release Electron app
    uses: samuelmeuli/action-electron-builder@master

only.

package.json ... "scripts": { "build": "yarn build-all && electron-builder --mac --windows", "build-all": "concurrently \"yarn build-main\" \"yarn build-renderer\"", "build-main": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.main.prod.babel.js --colors", "build-renderer": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.renderer.prod.babel.js --colors", "postinstall": "node -r @babel/register internals/scripts/CheckNativeDep.js && yarn flow-typed && electron-builder install-app-deps && yarn build-dll && opencollective-postinstall", "release": "yarn build-all && electron-builder --mac --windows --publish always" }, "build": { "productName": "ElectronReact", "appId": "com.tmksolutions.kztmk.electron_boilerplate", "files": [ "dist/", "node_modules/", "app.html", "main.prod.js", "main.prod.js.map", "package.json" ], "mac": { "hardenedRuntime": true, "entitlements": "./app/build/entitlement.plist", "entitlementsInherit": "./app/build/entitlement.plist" }, "dmg": { "contents": [ { "x": 130, "y": 220 }, { "x": 410, "y": 220, "type": "link", "path": "/Applications" } ] }, "win": { "target": [ { "target":"nsis", "arch":[ "ia32", "x64" ] } ] }, "linux": { "target": [ "deb", "rpm", "AppImage" ], "category": "Development" }, "directories": { "buildResources": "resources", "output": "release" }, "publish": { "provider": "github", "owner": "kztmk", "repo": "kztmk/kztmk-electron-boilerplate", "private": false } },

So I have got error

⨯ Build for macOS is supported only on macOS, please see https://electron.build/multi-platform-build

on github action release(windows-2019)

Please tell me how I can correct this error.

Thanks.

kztmk commented 4 years ago

I changed

script { "build": "yarn build-all", "release": "yarn build-all && electron-builder --mac --windows --publish always" }

Then it worked perfectly.

Thanks.