From 1b9acf6ded5a3b65414f069bb0c2c847ac83a145 Mon Sep 17 00:00:00 2001 From: Nick Cipollo Date: Sun, 4 Oct 2026 20:07:09 -0400 Subject: [PATCH] Fixes #632 Document required permissions in README (#633) * Fixes #632 Document required permissions in README Co-Authored-By: Claude Sonnet 5.5 * Drop redundant permissions note Co-Authored-By: Claude Sonnet 5.5 --------- Co-authored-by: Claude Sonnet 5.5 --- README.md | 4 ++-- README.zh-Hans.md | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0826232..dc326f7 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This action will create a GitHub release and optionally upload an artifact to it | body | An optional body for the release. Note: This input will have white space trimmed before and after it. Use `bodyFile` if you need a non-trivial markdown body. | false | "" | | bodyFile | An optional body file for the release. This should be the path to the file. | false | "" | | commit | An optional commit reference. This will be used to create the tag if it does not exist. | false | "" | -| discussionCategory | When provided this will generate a discussion of the specified category. The category must exist otherwise this will cause the action to fail. This isn't used with draft releases. | false | "" | +| discussionCategory | When provided this will generate a discussion of the specified category. The category must exist otherwise this will cause the action to fail. This isn't used with draft releases. Requires the `discussions: write` permission. | false | "" | | draft | Optionally marks this release as a draft release. Set to true to enable. | false | "" | | generateReleaseNotes | Indicates if release notes should be automatically generated. | false | false | | generateReleaseNotesPreviousTag | An optional previous tag to use when generating release notes. This will limit the release notes to changes between the two tags. | false | "" | @@ -42,7 +42,7 @@ This action will create a GitHub release and optionally upload an artifact to it | repo | Optionally specify the repo where the release should be generated. | false | current repo | | skipIfReleaseExists | When skipIfReleaseExists is enabled the action will be skipped if a non-draft release already exists for the provided tag. | false | false | | tag | An optional tag for the release. If this is omitted the git ref will be used (if it is a tag). | false | "" | -| token | The GitHub token. This will default to the GitHub app token. This is primarily useful if you want to use your personal token (for targeting other repos, etc). If you are using a personal access token it should have access to the `repo` scope. | false | github.token | +| token | The GitHub token. This will default to the GitHub app token. This is primarily useful if you want to use your personal token (for targeting other repos, etc). If you are using a personal access token it should have access to the `repo` scope. A custom token needs the same access as the permissions listed in the Notes section below (`contents: write`, plus `discussions: write` when `discussionCategory` is set). | false | github.token | | updateOnlyUnreleased | When allowUpdates is enabled, this will fail the action if the release it is updating is not a draft or a prerelease. | false | false | ## Action Outputs diff --git a/README.zh-Hans.md b/README.zh-Hans.md index fb5e840..42be5fd 100644 --- a/README.zh-Hans.md +++ b/README.zh-Hans.md @@ -23,7 +23,7 @@ | body | 发布的可选主体。注意:此处输入的首尾空格会被去除。如果您需要特殊的 markdown 内容,请使用 `bodyFile`。 | false | "" | | bodyFile | 发布的可选正文文件。 这应该是文件的路径。 | false | "" | | commit | 一个可选的提交 ref。 如果标签不存在,将用于创建标签。 | false | "" | -| discussionCategory | 当提供该选项时,将生成指定类别的 discussion。指定的类别必须存在,否则将导致 Action 失败。这对草案状态的发布不生效。API 不支持默认的 Announcement 分类,使用这个分类会引发错误。 | false | "" | +| discussionCategory | 当提供该选项时,将生成指定类别的 discussion。指定的类别必须存在,否则将导致 Action 失败。这对草案状态的发布不生效。需要 `discussions: write` 权限。 | false | "" | | draft | 可选择将此版本标记为草稿版本。 设置为 true 以启用。 | false | "" | | generateReleaseNotes | 指示是否应自动生成发行说明。 | false | false | | immutableCreate | 指示是否应使用不可变发布创建。启用时,操作将首先创建草稿,上传产出文件,然后发布版本。 | false | false | @@ -84,4 +84,3 @@ jobs: - 您必须通过 Action 输入或 git ref 提供一个标签(即推送/创建标签)。如果不提供标签,Action 将会失败。 - 如果您正在创建的版本的标签不存在,您应该同时设置标签和提交 Action 输入。 commit 可以指向提交 Hash 或分支名称(例如 - main)。 - 在上面的示例中,只需要指定操作的权限(即 contents: write)。 如果您将其他操作添加到同一工作流程,则应相应地扩展权限。 -- 有关于此 action 无法支持 discussion 的 Announcement 分类的原因的更多信息,请参见此处:https://github.com/goreleaser/goreleaser/issues/2304