Electron-builder: Can't build on Github Actions

Created on 17 Apr 2020  Â·  6Comments  Â·  Source: electron-userland/electron-builder


  • Version: 22.5.1


  • Electron Version: 8.2.3
  • Electron Type (current, beta, nightly): current

  • Target: macOS, Linux and Windows



When building via GH Action the script exits with a build failure, the last message says:

  ⨯ GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"

It used to work before on GH Actions (if that information helps :S ) and it still works locally on my Mac.

My repo with said action is here: https://github.com/hmt/bangbib/runs/595956659

backlog

Most helpful comment

A temporary workaround that I'm using for my Electron app is adding the token to the publish step:

- name: Publish
  run: |
    npm run dist
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

All 6 comments

Same here with a windows agent.

I'm having the same issue as well, but on multiple different versions of electron-builder and electron. All of my electron apps were previously working and allowed me to publish the release to Github, but it stopped working after I updated to macOS 10.15.4.

I've tried resolving it with the solutions from these previous issues, but none of them work.

A temporary workaround that I'm using for my Electron app is adding the token to the publish step:

- name: Publish
  run: |
    npm run dist
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

A temporary workaround that I'm using for my Electron app is adding the token to the publish step:

- name: Publish
  run: |
    npm run dist
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

If I'm not incorrect this isn't a temporary workaround but the proper way of setting environment variables for github actions.

May I also point your attention to this cool action that someone created: https://github.com/marketplace/actions/electron-builder-action

It should allow for what you need, though I haven't tried it yet

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

noahprince22 picture noahprince22  Â·  3Comments

JohnWeisz picture JohnWeisz  Â·  3Comments

leo picture leo  Â·  3Comments

omarkilani picture omarkilani  Â·  3Comments

ccorcos picture ccorcos  Â·  3Comments