From ff689a688188277d599830c79aa099b9764cb84c Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 14 Mar 2026 22:56:01 -0400 Subject: [PATCH] docs: clarify empty token handling Signed-off-by: Rui Chen --- README.md | 3 ++- action.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 923a537..ac9ab85 100644 --- a/README.md +++ b/README.md @@ -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 `/` 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 | diff --git a/action.yml b/action.yml index 5174c47..2175241 100644 --- a/action.yml +++ b/action.yml @@ -41,7 +41,7 @@ inputs: description: "Repository to make releases against, in / 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: