Skip to content

Commit

Permalink
ci: fix electron publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Wurielle committed Oct 5, 2024
1 parent 330403a commit 6c4a86e
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions apps/app/electron-builder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,38 @@ const fs = require('fs')
const pkg = require('./package.json')

function getElectronVersion() {
const electronPath = require.resolve('electron')
const electronPath = require.resolve('electron')

const data = fs.readFileSync(path.join(electronPath, '..', 'package.json'))
const version = JSON.parse(data.toString())?.version
return version
const data = fs.readFileSync(path.join(electronPath, '..', 'package.json'))
const version = JSON.parse(data.toString())?.version
return version
}

/**
* @type {import('electron-builder').Configuration}
* @see https://www.electron.build/configuration/configuration
*/
module.exports = {
$schema:
'https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json',
asar: true,
productName: pkg.productName,
directories: {
output: 'dist_electron',
},
files: ['dist', 'dist-electron'],
nsis: {
oneClick: true,
perMachine: false,
allowToChangeInstallationDirectory: false,
deleteAppDataOnUninstall: false,
},
appId: 'com.nhs.izabela',
generateUpdatesFilesForAllChannels: true,
// eslint-disable-next-line no-template-curly-in-string
artifactName: '${name}-setup-${version}-${os}.${ext}',
publish: ['github'],
electronVersion: getElectronVersion(),
extraFiles: ['./resources/**'],
$schema:
'https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json',
asar: true,
productName: pkg.productName,
directories: {
output: 'dist_electron',
},
files: ['dist', 'dist-electron'],
nsis: {
oneClick: true,
perMachine: false,
allowToChangeInstallationDirectory: false,
deleteAppDataOnUninstall: false,
},
appId: 'com.nhs.izabela',
generateUpdatesFilesForAllChannels: true,
// eslint-disable-next-line no-template-curly-in-string
artifactName: '${name}-setup-${version}-${os}.${ext}',
publish: ['github'],
publishAutoUpdate: false,
electronVersion: getElectronVersion(),
extraFiles: ['./resources/**'],
}

0 comments on commit 6c4a86e

Please sign in to comment.