diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d3c6e86a..676c3d6cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,8 @@ jobs: fail-fast: false matrix: os: - - ubuntu-latest + - ubuntu-20.04 + - ubuntu-22.04-arm include: - os: macos-13 cert_key: APPLE_DEVELOPER_SIGNING_CERTIFICATE @@ -64,12 +65,12 @@ jobs: node-version: 18.12.1 cache: 'npm' - name: install Linux dev tools - if: matrix.os == 'ubuntu-latest' + if: startsWith(matrix.os, 'ubuntu') run: | sudo apt update -y sudo apt install -y libudev-dev - name: install Macos dev tools - if: matrix.os == 'macos-13' + if: startsWith(matrix.os, 'macos') run: | sudo -H pip install setuptools - name: create NPM config file @@ -82,4 +83,9 @@ jobs: - name: Sleep for 4 seconds shell: bash run: sleep 4 - - run: npm run publish + - name: Publish + if: ${{ startsWith(matrix.os, 'ubuntu') && endsWith(matrix.os, 'arm') }} + run: npm run publish:linux:arm64 + - name: Publish + if: ${{ !startsWith(matrix.os, 'ubuntu') || !endsWith(matrix.os, 'arm') }} + run: npm run publish diff --git a/build/electron-builder-base.js b/build/electron-builder-base.js new file mode 100644 index 000000000..cbe742ace --- /dev/null +++ b/build/electron-builder-base.js @@ -0,0 +1,7 @@ +const config = { + appId: 'sh.frame.app', + productName: 'Frame', + files: ['compiled', 'bundle', '!compiled/main/dev'] +} + +module.exports = config diff --git a/build/electron-builder-linux-arm64.js b/build/electron-builder-linux-arm64.js new file mode 100644 index 000000000..4dc159f9b --- /dev/null +++ b/build/electron-builder-linux-arm64.js @@ -0,0 +1,21 @@ +// build config for linux arm64 + +const baseConfig = require('./electron-builder-base.js') + +const config = { + ...baseConfig, + linux: { + target: [ + { + target: 'AppImage', + arch: ['arm64'] + }, + { + target: 'tar.gz', + arch: ['arm64'] + } + ] + } +} + +module.exports = config diff --git a/build/electron-builder-standard.js b/build/electron-builder-standard.js new file mode 100644 index 000000000..a882dc70c --- /dev/null +++ b/build/electron-builder-standard.js @@ -0,0 +1,46 @@ +// build config for every platform and architecture EXCEPT linux arm64 + +const baseConfig = require('./electron-builder-base.js') + +const config = { + ...baseConfig, + afterSign: './build/notarize.js', + linux: { + target: [ + { + target: 'AppImage', + arch: ['x64'] + }, + { + target: 'deb', + arch: ['x64'] + }, + { + target: 'snap', + arch: ['x64'] + }, + { + target: 'tar.gz', + arch: ['x64'] + } + ] + }, + mac: { + target: { + target: 'default', + arch: ['x64', 'arm64'] + }, + notarize: false, + hardenedRuntime: true, + gatekeeperAssess: false, + entitlements: 'build/entitlements.mac.plist', + requirements: 'build/electron-builder-requirements.txt' + }, + win: { + publisherName: 'Frame Labs, Inc.', + signAndEditExecutable: true, + icon: 'build/icons/icon.png' + } +} + +module.exports = config diff --git a/electron-builder.json b/electron-builder.json deleted file mode 100644 index b577407c1..000000000 --- a/electron-builder.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "appId": "sh.frame.app", - "afterSign": "./build/notarize.js", - "productName": "Frame", - "linux": { - "target": [ - { - "target": "AppImage", - "arch": ["x64", "arm64"] - }, - { - "target": "deb", - "arch": ["x64", "arm64"] - }, - { - "target": "snap", - "arch": ["x64"] - }, - { - "target": "tar.gz", - "arch": ["x64", "arm64"] - } - ] - }, - "mac": { - "target": { - "target": "default", - "arch": ["x64", "arm64"] - }, - "notarize": false, - "hardenedRuntime": true, - "gatekeeperAssess": false, - "entitlements": "build/entitlements.mac.plist", - "requirements": "build/electron-builder-requirements.txt" - }, - "win": { - "publisherName": "Frame Labs, Inc.", - "signAndEditExecutable": true, - "icon": "build/icons/icon.png" - }, - "files": ["compiled", "bundle", "!compiled/main/dev"] -} diff --git a/package-lock.json b/package-lock.json index c494b10f3..9276ad425 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "frame", - "version": "0.6.10", + "version": "0.6.11", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "frame", - "version": "0.6.10", + "version": "0.6.11", "hasInstallScript": true, "license": "GPL-3.0", "dependencies": { diff --git a/package.json b/package.json index 747e9185e..4e2fce13c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "frame", - "version": "0.6.10", + "version": "0.6.11", "description": "System-wide web3", "main": "compiled/main", "scripts": { @@ -37,10 +37,11 @@ "prod": "npm run compile && npm run bundle && npm run launch", "compile": "npm run copy-assets && tsc --project tsconfig.build.json", "compile:watch": "npm run copy-assets && tsc --project tsconfig.build.json -w", - "build": "npm run compile && sleep 4 && npm run bundle && sleep 4 && electron-builder", + "build": "npm run compile && sleep 4 && npm run bundle && sleep 4 && electron-builder --config=build/electron-builder-standard.js", "copy-assets": "shx mkdir -p ./compiled/main/windows && shx cp ./main/windows/*.png ./compiled/main/windows", "parcel:build": "parcel build --no-autoinstall --public-url .", - "publish": "electron-builder -c.snap.publish=github", + "publish": "electron-builder -c.snap.publish=github --config=build/electron-builder-standard.js", + "publish:linux:arm64": "electron-builder -c.snap.publish=github --config=build/electron-builder-linux-arm64.js", "release": "npm run compile && sleep 4 && npm run bundle && sleep 4 && npm run publish", "postinstall": "electron-builder install-app-deps", "test": "npm run test:unit && npm run test:e2e",