Skip to content

Commit

Permalink
Environment variables are now used to set installer metadata (#9)
Browse files Browse the repository at this point in the history
* Put it back!

* Force github actions.

* Changed name of electron-builder config.

* Fixed environment variables

* Fixed version?
  • Loading branch information
jedieaston authored Oct 13, 2021
1 parent f82c190 commit ab8d18a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 45 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ jobs:
run: npm run build -m
- name: Package
run: npm run dist
# Build number is automatically appended to version from package.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_NUMBER: ${{ github.run_number }}
THE_AUTHOR: ${{ secrets.AUTHOR }}
THE_EMAIL: ${{ secrets.EMAIL }}
- name: show dir
run: ls dist
- uses: ncipollo/release-action@v1
Expand Down
55 changes: 55 additions & 0 deletions electron-builder-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
const config = {
appId: "im.hmt.report.schild",
productName: "schild.report",
artifactName: "schild.report.${ext}",
copyright: `Copyright ${process.env.THE_AUTHOR}`,
extraMetadata: {
author: {
name: `${process.env.THE_AUTHOR}`,
email: `${process.env.THE_EMAIL}`
}
},
files: [
"./build/**/*"
],
win: {
icon: "icons/icon.ico",
target: "msi",

},
linux: {
icon: "icons/icon.png",
category: "app.tools",
executableName: "schild.report",
target: [
"AppImage",
"snap",
"deb",
"rpm"
]
},
mac: {
icon: "icons/icon.icns",
target: "dmg"
},
dmg: {
icon: "icons/icon.icns",
contents: [
{
x: 130,
y: 220
},
{
x: 550,
y: 22,
type: "link",
path: "/Applications"
}
],
window: {
width: 680,
height: 42
}
}
}
module.exports = config
44 changes: 0 additions & 44 deletions electron-builder.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"package-win": "electron-packager . --overwrite --name=schild.report --platform=win32 --arch=ia32 --icon=icons/icon.ico --asar --out=release",
"package-mac": "electron-packager . --overwrite --name=schild.report --platform=darwin --arch=x64 --icon=icons/icon.icns --asar --out=release",
"package-linux": "electron-packager . --overwrite --name=schild.report --platform=linux --arch=x64 --icon=icons/icon.png --asar --out=release",
"dist": "electron-builder",
"dist": "electron-builder --config electron-builder-config.js",
"start:electron": "electron .",
"dev:development": "rollup --config --watch",
"dev:electron": "electron .",
Expand Down

0 comments on commit ab8d18a

Please sign in to comment.