Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
- name: Build Electron app
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EP_GH_IGNORE_TIME: true
EP_DRAFT: false
APPLE_API_KEY: /tmp/apikey.p8
APPLE_API_KEY_ID: ${{ secrets.ELECTRON_APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.ELECTRON_APPLE_API_ISSUER }}
Expand Down
6 changes: 5 additions & 1 deletion electron/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,15 @@ function go() {
}
console.log(`targetPlatform: ${targetPlatform}`)

// Only publish when the GH_TOKEN is set.
// This indicates the intent to publish the build to a release.
const publishOption = process.env.GH_TOKEN ? 'always' : 'never';

builder
.build({
targets: Platform[targetPlatform.toUpperCase()].createTarget(),
config: options,
publish: 'always',
publish: publishOption,
})
.then((result) => {
console.info('----------------------------');
Expand Down