Test different method for ARM builds

This commit is contained in:
Preston 2020-07-21 17:43:52 -04:00
parent 4e2c37b9ef
commit c43c97ecbf
3 changed files with 14 additions and 1 deletions

View File

@ -25,6 +25,9 @@ jobs:
- run: npm ci - run: npm ci
- run: npm run lint - run: npm run lint
- run: npm run build --if-present - run: npm run build --if-present
- name: Build ARM64 with Node.js ${{ matrix.node-version}}
if: startsWith(matrix.os, 'ubuntu')
run: npm run build:arm --if-present
- name: Upload .deb Artifact - name: Upload .deb Artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
if: startsWith(matrix.os, 'ubuntu') if: startsWith(matrix.os, 'ubuntu')

View File

@ -2,7 +2,9 @@ const os = require('os')
const builder = require('electron-builder') const builder = require('electron-builder')
const Platform = builder.Platform const Platform = builder.Platform
const Arch = builder.Arch
const { name, productName } = require('../package.json') const { name, productName } = require('../package.json')
const args = process.argv
let targets let targets
var platform = os.platform() var platform = os.platform()
@ -12,7 +14,13 @@ if (platform == 'darwin') {
} else if (platform == 'win32') { } else if (platform == 'win32') {
targets = Platform.WINDOWS.createTarget() targets = Platform.WINDOWS.createTarget()
} else if (platform == 'linux') { } else if (platform == 'linux') {
targets = Platform.LINUX.createTarget() let arch = Arch.x64
if (args[0] === 'arm') {
arch = Arch.arm64
}
targets = Platform.LINUX.createTarget(['deb', 'zip', 'apk', 'rpm', 'AppImage'], arch)
} }
const config = { const config = {

View File

@ -108,7 +108,9 @@
}, },
"scripts": { "scripts": {
"build": "run-s rebuild:electron pack build-release", "build": "run-s rebuild:electron pack build-release",
"build:arm": "run-s rebuild:electron pack build-release:arm",
"build-release": "node _scripts/build.js", "build-release": "node _scripts/build.js",
"build-release:arm": "node _scripts/build.js arm",
"debug": "run-s rebuild:electron debug-runner", "debug": "run-s rebuild:electron debug-runner",
"debug-runner": "node _scripts/dev-runner.js --remote-debug", "debug-runner": "node _scripts/dev-runner.js --remote-debug",
"dev": "run-s rebuild:electron dev-runner", "dev": "run-s rebuild:electron dev-runner",