Skip to content

Commit

Permalink
GITBOOK-198: Add more details for GITHUB_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzhao authored and gitbook-bot committed Feb 12, 2025
1 parent b851699 commit 70b4de6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion config/publishers/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,22 @@ module.exports = {
```
{% endcode %}

Configuration options are documented in [`PublisherGitHubConfig`](https://js.electronforge.io/interfaces/\_electron\_forge\_publisher\_github.PublisherGitHubConfig.html).
Configuration options are documented in [`PublisherGitHubConfig`](https://js.electronforge.io/interfaces/_electron_forge_publisher_github.PublisherGitHubConfig.html).

### Authentication

We recommend using the `process.env.GITHUB_TOKEN` environment variable to authenticate the GitHub Publisher. This token requires write permissions to your repository's contents to create new releases.

{% hint style="info" %}
If you are publishing your app with GitHub Actions, the `GITHUB_TOKEN` secret is pre-populated in every workflow. You will need to grant the necessary permissions via the `permissions` field at the top level of your workflow configuration.

```yaml
permissions:
contents: write
```
See the [Controlling permissions for GITHUB\_TOKEN](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token) documentation for more information.
{% endhint %}
### Uploading to GitHub Enterprise instances
Expand Down

0 comments on commit 70b4de6

Please sign in to comment.