docs: clarify empty token handling

Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
Rui Chen
2026-03-14 22:56:01 -04:00
parent 0a28836784
commit ff689a6881
2 changed files with 3 additions and 2 deletions

View File

@@ -169,6 +169,7 @@ jobs:
# note you'll typically need to create a personal access token
# with permissions to create releases in the other repo.
# A non-empty explicit token overrides GITHUB_TOKEN.
# Omit the input to use github.token; passing "" treats the token as unset.
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
```
@@ -192,7 +193,7 @@ The following are optional as `step.with` keys
| `fail_on_unmatched_files` | Boolean | Indicator of whether to fail if any of the `files` globs match nothing |
| `repository` | String | Name of a target repository in `<owner>/<repo>` format. Defaults to GITHUB_REPOSITORY env variable |
| `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. |
| `token` | String | Authorized GitHub token or PAT. Defaults to `${{ github.token }}`. A non-empty explicit token overrides `GITHUB_TOKEN`. |
| `token` | String | Authorized GitHub token or PAT. Defaults to `${{ github.token }}` when omitted. A non-empty explicit token overrides `GITHUB_TOKEN`. Passing `""` treats the token as explicitly unset, so omit the input entirely or use an expression such as `${{ inputs.token || github.token }}` when wrapping this action in a composite action. |
| `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) |
| `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 |
| `append_body` | Boolean | Append to existing body instead of overwriting it |

View File

@@ -41,7 +41,7 @@ inputs:
description: "Repository to make releases against, in <owner>/<repo> format"
required: false
token:
description: "Authorized GitHub token or PAT. Defaults to github.token. A non-empty explicit token overrides GITHUB_TOKEN."
description: "Authorized GitHub token or PAT. Defaults to github.token when omitted. A non-empty explicit token overrides GITHUB_TOKEN. Passing an empty string treats the token as unset."
required: false
default: ${{ github.token }}
target_commitish: