Skip to content

Commit

Permalink
feat: use of update-electron-app and try to generate arm64/maos build
Browse files Browse the repository at this point in the history
  • Loading branch information
hrenaud committed Aug 15, 2024
1 parent 3a77035 commit d0bf6e1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ jobs:
os: [
{ name: 'linux', image: 'ubuntu-latest' },
{ name: 'windows', image: 'windows-latest' },
{ name: 'macos', image: 'macos-13' },
{ name: 'macos/intel', image: 'macos-13' },
{ name: 'macos/M1', image: 'macos-14' },
# { name: 'windows', image: 'windows-latest/x86' },
# { name: 'windows', image: 'windows-latest/x64' },
# { name: 'macos', image: 'macos-13/amd64' },
# { name: 'macos', image: 'macos-13/ || matrix.os.image == 'macos-14'amd64' },
]
runs-on: ${{ matrix.os.image }}
steps:
Expand All @@ -35,13 +36,13 @@ jobs:
with:
node-version: 18
- name: setup python
if: matrix.os.image == 'macos-13'
if: matrix.os.image == 'macos-13' || matrix.os.image == 'macos-14'
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: install setuptools and appdmg
# fix error Error: Cannot find module 'appdmg'
if: matrix.os.image == 'macos-13'
if: matrix.os.image == 'macos-13' || matrix.os.image == 'macos-14'
run: |
python3 -m pip install setuptools --break-system-packages
npm i -g appdmg
Expand All @@ -58,28 +59,28 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Debug APPLE_ID
if: matrix.os.image == 'macos-13'
if: matrix.os.image == 'macos-13' || matrix.os.image == 'macos-14'
run: echo ${APPLE_ID:0:3}
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
- name: Debug APPLE_PASSWORD
if: matrix.os.image == 'macos-13'
if: matrix.os.image == 'macos-13' || matrix.os.image == 'macos-14'
run: echo ${APPLE_PASSWORD:0:3}
env:
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
- name: Debug APPLE_TEAM_ID
if: matrix.os.image == 'macos-13'
if: matrix.os.image == 'macos-13' || matrix.os.image == 'macos-14'
run: echo ${APPLE_TEAM_ID:0:3}
env:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- name: Add MacOS certs
if: matrix.os.image == 'macos-13'
if: matrix.os.image == 'macos-13' || matrix.os.image == 'macos-14'
run: chmod +x add-osx-cert.sh && ./add-osx-cert.sh
env:
CERTIFICATE_OSX_APPLICATION: ${{ secrets.APPLE_APPLICATION_CERT }}
CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APPLICATION_CERT_PASSWORD }}
- name: Make app
if: matrix.os.image != 'macos-13'
if: matrix.os.image != 'macos-13' || matrix.os.image == 'macos-14'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_ID: ${{ secrets.APPLE_ID }}
Expand All @@ -90,7 +91,7 @@ jobs:
DEBUG: '@electron/osx-sign,electron-forge:*'
run: npm run make:ci
- name: Make mac app
if: matrix.os.image == 'macos-13'
if: matrix.os.image == 'macos-13' || matrix.os.image == 'macos-14'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_ID: ${{ secrets.APPLE_ID }}
Expand Down
6 changes: 5 additions & 1 deletion electron-app/ecoindex-app/src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { isPupperteerBrowserInstalled } from './handlers/IsPuppeteerBrowserInsta
import log from 'electron-log/main'
import os from 'os'
import packageJson from '../../package.json'
import { updateElectronApp } from 'update-electron-app'

// #endregion
// #region Intialization
Expand Down Expand Up @@ -203,7 +204,10 @@ app.on('ready', () => {
credits: packageJson.description,
copyright: packageJson.publisher,
})
Updater.getInstance().checkForUpdates(false)
// Updater.getInstance().checkForUpdates(false)
updateElectronApp({
logger: require('electron-log'),
})
// showNotification()
createMainWindow()
})
Expand Down

0 comments on commit d0bf6e1

Please sign in to comment.