DEV Community

Discussion on: Build and Publish a Multi-Platform Electron App on GitHub

Collapse
 
abulka profile image
Andy Bulka

Thanks for a great article. You have a typo in the use of 'draft' - which needs to be outside the repository json config, not inside it. It should look like:

"publishers": [
  {
    "name": "@electron-forge/publisher-github",
    "config": {
      "repository": {
        "owner": "erikhofer",
        "name": "hello-electron"
      },
    "draft": true
    }
  }
]
Enter fullscreen mode Exit fullscreen mode

Also, as you are no doubt aware, there is a shorthand way of specifying jobs for all operating systems, which means a much shorter yml workflow file and no duplication of lines needed.

jobs:
  release:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]

    steps:
    - uses: actions/checkout@v2       
    - uses: actions/setup-node@master
      with:
        node-version: 14
    - name: install dependencies
      run: npm install
    - name: publish
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: npm run publish
Enter fullscreen mode Exit fullscreen mode

Hoping you write some follow up articles about auto-updating and code signing!

Collapse
 
erikhofer profile image
Erik Hofer

Ah thanks, fixed the draft typo.

I've seen the matrix build before but it didn't come to mind at the time. Thanks for the addition, it's much more concise!