Skip to content

Commit bafaa2d

Browse files
authored
docs: clarify token precedence in docs (#752)
Signed-off-by: Rui Chen <rui@chenrui.dev>
1 parent b36466e commit bafaa2d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ jobs:
167167
body_path: ${{ github.workspace }}-CHANGELOG.txt
168168
repository: my_gh_org/my_gh_repo
169169
# note you'll typically need to create a personal access token
170-
# with permissions to create releases in the other repo
170+
# with permissions to create releases in the other repo.
171+
# A non-empty explicit token overrides GITHUB_TOKEN.
171172
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
172173
```
173174

@@ -191,7 +192,7 @@ The following are optional as `step.with` keys
191192
| `fail_on_unmatched_files` | Boolean | Indicator of whether to fail if any of the `files` globs match nothing |
192193
| `repository` | String | Name of a target repository in `<owner>/<repo>` format. Defaults to GITHUB_REPOSITORY env variable |
193194
| `target_commitish` | String | Commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Defaults to repository default branch. |
194-
| `token` | String | Secret GitHub Personal Access Token. Defaults to `${{ github.token }}` |
195+
| `token` | String | Authorized GitHub token or PAT. Defaults to `${{ github.token }}`. A non-empty explicit token overrides `GITHUB_TOKEN`. |
195196
| `discussion_category_name` | String | If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see ["Managing categories for discussions in your repository."](https://docs.github.com/en/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository) |
196197
| `generate_release_notes` | Boolean | Whether to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes. See the [GitHub docs for this feature](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) for more information |
197198
| `append_body` | Boolean | Append to existing body instead of overwriting it |

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ inputs:
4141
description: "Repository to make releases against, in <owner>/<repo> format"
4242
required: false
4343
token:
44-
description: "Authorized secret GitHub Personal Access Token. Defaults to github.token"
44+
description: "Authorized GitHub token or PAT. Defaults to github.token. A non-empty explicit token overrides GITHUB_TOKEN."
4545
required: false
4646
default: ${{ github.token }}
4747
target_commitish:

0 commit comments

Comments
 (0)