Skip to content

Commit

Permalink
feat: improved electron-reforger config (#147)
Browse files Browse the repository at this point in the history
* feat: code signing

* feat: improved reforger config
  • Loading branch information
AuHau committed Jun 27, 2022
1 parent b50438d commit 83bcf36
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 48 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
publish:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ ubuntu-latest, macos-latest, windows-latest ]

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -28,7 +28,7 @@ jobs:
field: KEY
value: ${{ secrets.SENTRY_KEY }}

- name: publish
- name: Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run publish
Expand Down
10 changes: 10 additions & 0 deletions assets/entitlements.plist
Original file line number Diff line number Diff line change
@@ -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.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.debugger</key>
<true/>
</dict>
</plist>
File renamed without changes.
64 changes: 64 additions & 0 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
const path = require('path')

// Taken over from https://github.com/electron/fiddle/blob/main/forge.config.js

const iconPath = path.resolve(__dirname, 'assets', 'icon.icns')

const config = {
packagerConfig: {
icon: iconPath,
executableName: 'swarm-desktop',
name: 'Swarm Desktop',
appBundleId: 'org.ethswarm.swarmDesktop',
win32metadata: {
CompanyName: 'Swarm Foundation',
OriginalFilename: 'Swarm Desktop',
},
osxSign: {
hardenedRuntime: true,
'gatekeeper-assess': false,
entitlements: 'assets/entitlements.plist',
'entitlements-inherit': 'assets/entitlements.plist',
},
},
electronInstallerDebian: {
bin: 'Swarm Desktop',
},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {
name: 'swarm-desktop',
},
},
{
name: '@electron-forge/maker-dmg',
config: {
icon: iconPath,
},
},
{
name: '@electron-forge/maker-deb',
config: {},
},
{
name: '@electron-forge/maker-rpm',
config: {},
},
],
publishers: [
{
name: '@electron-forge/publisher-github',
config: {
repository: {
owner: 'ethersphere',
name: 'swarm-desktop',
},
prerelease: true,
draft: false,
},
},
],
}

module.exports = config
Binary file removed icon.png
Binary file not shown.
46 changes: 0 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,52 +39,6 @@
"desktop"
],
"license": "BSD-3-Clause",
"config": {
"forge": {
"packagerConfig": {
"icon": "icon.icns",
"executableName": "swarm-desktop"
},
"electronInstallerDebian": {
"bin": "Swarm Desktop"
},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "bee_desktop"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
],
"publishers": [
{
"name": "@electron-forge/publisher-github",
"config": {
"repository": {
"owner": "ethersphere",
"name": "bee-desktop"
},
"prerelease": true,
"draft": false
}
}
]
}
},
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.63",
"@electron-forge/maker-deb": "^6.0.0-beta.63",
Expand Down

0 comments on commit 83bcf36

Please sign in to comment.