Skip to content

Commit 70b4de6

Browse files
erickzhaogitbook-bot
authored andcommitted
GITBOOK-198: Add more details for GITHUB_TOKEN
1 parent b851699 commit 70b4de6

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

config/publishers/github.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,22 @@ module.exports = {
3232
```
3333
{% endcode %}
3434

35-
Configuration options are documented in [`PublisherGitHubConfig`](https://js.electronforge.io/interfaces/\_electron\_forge\_publisher\_github.PublisherGitHubConfig.html).
35+
Configuration options are documented in [`PublisherGitHubConfig`](https://js.electronforge.io/interfaces/_electron_forge_publisher_github.PublisherGitHubConfig.html).
36+
37+
### Authentication
38+
39+
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.
40+
41+
{% hint style="info" %}
42+
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.
43+
44+
```yaml
45+
permissions:
46+
contents: write
47+
```
48+
49+
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.
50+
{% endhint %}
3651
3752
### Uploading to GitHub Enterprise instances
3853

0 commit comments

Comments
 (0)