Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Support for a separate Github release token to the auto-update token #8173

Merged
merged 3 commits into from
Apr 20, 2024

Conversation

AndrewEQ
Copy link
Contributor

Reference: #5688 - Discussion about keeping two separate tokens; one for publishing to Github releases and the other used by the app to make requests for auto-update updates.

Now you can set a release token that has write permissions to publish your release.

The release token will be used instead of a GH_TOKEN || GITHUB_TOKEN ONLY during publishing.

The Github token defined via the Github options or environment variable will still be used as normal.

mac: export GITHUB_RELEASE_TOKEN=<my token>

I used the Contents permission for a New fine-grained personal access token with "Read and write". "Read-only" for the usual app-update token.

So even if the app-update token is inside your app-update.yml its only read-only, yay! (Mac: you can find the app-update.yml by right-click > Show Package Contents > Contents > Resources)

…token

Reference: electron-userland#5688 - Discussion about keeping two separate tokens; one for publishing to Github releases and the other used by the app to make requests for auto-update updates.

Now you can set a release token that has write permissions to publish your release.

The release token will be used instead of a GH_TOKEN || GITHUB_TOKEN ONLY during publishing.

The Github token defined via the Github options or environment variable will still be used as normal.

mac: ``` export GITHUB_RELEASE_TOKEN=<my token> ```

I used the Contents permission for a New fine-grained personal access token with "Read and write". "Read-only" for the usual app-update token.

So even if the app-update token is inside your app-update.yml its only read-only, yay! (Mac: you can find the app-update.yml by right-click > Show Package Contents > Contents > Resources)
Copy link

changeset-bot bot commented Apr 12, 2024

🦋 Changeset detected

Latest commit: 08d986e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
electron-publish Major
app-builder-lib Major
dmg-builder Major
electron-builder-squirrel-windows Major
electron-builder Major
electron-forge-maker-appimage Major
electron-forge-maker-nsis-web Major
electron-forge-maker-nsis Major
electron-forge-maker-snap Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Apr 12, 2024

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
🔨 Latest commit 08d986e
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/661ff4b5b393880008b5e991
😎 Deploy Preview https://deploy-preview-8173--car-park-attendant-cleat-11576.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@AndrewEQ AndrewEQ changed the title [Add] Support for a separate Github release token to the auto-update token feat: Add Support for a separate Github release token to the auto-update token Apr 12, 2024
@mmaietta
Copy link
Collaborator

Love this idea, thank you for opening a PR!

Do we need to update the docs anywhere for this change? Looks like this may need to be updated to include your new logic/description
https://www.electron.build/configuration/publish

@AndrewEQ
Copy link
Contributor Author

Love this idea, thank you for opening a PR!

Do we need to update the docs anywhere for this change? Looks like this may need to be updated to include your new logic/description https://www.electron.build/configuration/publish

Cool, added a note to the publish docs 👍

@mmaietta mmaietta merged commit 3ae3589 into electron-userland:master Apr 20, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants