Skip to content

Commit

Permalink
break up config files
Browse files Browse the repository at this point in the history
  • Loading branch information
mholtzman committed Jan 29, 2025
1 parent 9432b10 commit 835b7f6
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 44 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
os:
#- ubuntu-20.04
- ubuntu-20.04
- ubuntu-22.04-arm
# include:
# - os: macos-13
Expand Down Expand Up @@ -96,4 +96,9 @@ jobs:
- name: Sleep for 4 seconds
shell: bash
run: sleep 4
- run: npm run publish
- name: Publish
if: matrix.os == 'ubuntu-22.04-arm'
run: npm run publish:arm64
- name: Publish
if: matrix.os != 'ubuntu-22.04-arm'
run: npm run publish
7 changes: 7 additions & 0 deletions builder/electron-builder-base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const config = {
appId: 'sh.frame.app',
productName: 'Frame',
files: ['compiled', 'bundle', '!compiled/main/dev']
}

module.exports = config
21 changes: 21 additions & 0 deletions builder/electron-builder-linux-arm64.js
Original file line number Diff line number Diff line change
@@ -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
46 changes: 46 additions & 0 deletions builder/electron-builder-standard.js
Original file line number Diff line number Diff line change
@@ -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
42 changes: 0 additions & 42 deletions electron-builder.json

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"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:arm64": "electron-builder -c.snap.publish=github --config=builder/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",
Expand Down

0 comments on commit 835b7f6

Please sign in to comment.