samuelmeuli / action-electron-builder

:electron: GitHub Action for building and releasing Electron apps
MIT License
658 stars 201 forks source link

GitHub Personal Access Token ("***") contains invalid characters, please check env "GH_TOKEN" #2

Closed filiptronicek closed 4 years ago

filiptronicek commented 4 years ago

Hi, I was trying to draft a new release, but the build failed.

Here is the log:

Releasing the Electron app…

• electron-builder version=21.2.0 os=5.0.0-1023-azure

• loaded configuration file=package.json ("build" field)

• packaging platform=linux arch=x64 electron=7.1.1 appOutDir=dist/linux-unpacked

• building target=AppImage arch=x64 file=dist/Interclip-0.0.5.AppImage

⨯ GitHub Personal Access Token ("***") contains invalid characters, please check env "GH_TOKEN" child_process.js:655

throw err;
^

But the documentation of this action says that the GH token is generated automatically, so where's the problem?

samuelmeuli commented 4 years ago

This seems to have been an issue with electron-builder (https://github.com/electron-userland/electron-builder/issues/4176) which has been fixed back in September (https://github.com/electron-userland/electron-builder/pull/4225).

Are you using the latest version of electron-builder?

filiptronicek commented 4 years ago

Okay, thanks, that worked. But now it doesn't want to publish the release. • GitHub release not created reason=existing type not compatible with publishing type tag=v0.0.6 version=0.0.6 existingType=pre-release publishingType=draft • skipped publishing file=Interclip-0.0.6.AppImage reason=existing type not compatible with publishing type tag=v0.0.6 version=0.0.6 existingType=pre-release publishingType=draft • skipped publishing file=latest-linux.yml reason=existing type not compatible with publishing type tag=v0.0.6 version=0.0.6 existingType=pre-release publishingType=draft

samuelmeuli commented 4 years ago

Seems like a configuration issue with electron-builder. Please search the existing issues in that repo or open a new one there if they don't solve your problem :)

samuelmeuli commented 4 years ago

Just ran into this myself. electron-builder fixes this issue in v22. It's important to know that simply updating electron-builder to the latest version currently doesn't fix this because v22 is still in beta. Updating it using yarn add --dev electron-builder@^22.0.0 shoud do it though.