You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add documentation for using GitHub App Installation tokens instead of personal access tokens.
Identified this while using an app installation token locally and working through the code.
It seems that the use case for GitHub App Installations is currently only for specifically
running from within GitHub Actions, which sets GITHUB_TOKEN rather than GH_TOKEN. However,
it is possible that other CI tools make use of GitHub App Installation tokens, and thus they
also require the same treatment.
This could be fixed in the code to be more explicit, but for now hopefully the documentation
change is helpful to some.
Copy file name to clipboardExpand all lines: README.md
+7-1
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,12 @@ When using the _GITHUB_TOKEN_, the **minimum required permissions** are:
74
74
|`GITHUB_API_URL` or `GH_URL` or `GITHUB_URL`| The GitHub Enterprise endpoint. |
75
75
|`GH_PREFIX` or `GITHUB_PREFIX`| The GitHub Enterprise API prefix. |
76
76
77
+
#### Using GitHub App Installation tokens
78
+
79
+
If the token you are using is from a GitHub App Installation instead of a Personal Access Token,
80
+
then you must use `GITHUB_TOKEN` instead of `GH_TOKEN` and set `GITHUB_ACTION=true` in your environment prior to running.
81
+
[See `get-git-auth-url` for details](https://github.com/semantic-release/semantic-release/blob/fa241a2a06b593d1a04cb0af07ee31acd5b3cae8/lib/get-git-auth-url.js#L65-L67]).
82
+
77
83
### Options
78
84
79
85
| Option | Description | Default |
@@ -218,4 +224,4 @@ Valid values for this option are `false`, `"top"` or `"bottom"`.
218
224
219
225
##### addReleases example
220
226
221
-
See [The introducing PR](https://github.com/semantic-release/github/pull/282) for an example on how it will look.
227
+
See [The introducing PR](https://github.com/semantic-release/github/pull/282) for an example on how it will look.
0 commit comments