fix(ci): grant contents:write to build job for JReleaser release#101
Merged
Conversation
The repository's default GITHUB_TOKEN permission is now read-only, so JReleaser's full-release step fails with 403 Forbidden when it tries to delete/recreate the early-access GitHub release. Explicitly request contents:write at the job level so the release step works regardless of the repo/org default workflow permission. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
master への push で走る
Build and Releaseワークフロー(build.yml)の JReleaserfull-releaseステップが 403 Forbidden で失敗している問題を修正します。参考: 失敗した CI 実行 https://github.com/nulab/backlog4j/actions/runs/28573715743
原因
early-access)の削除・再作成部分のみ。default_workflow_permissionsが現在read(読み取り専用)になっている。以前は write だったため YAML にpermissions:を書かなくてもGITHUB_TOKENでリリースを操作できていた。修正内容
buildジョブにpermissions: contents: writeを明示的に付与し、リポジトリ/組織のデフォルト権限に依存せずリリース操作が行えるようにする。🤖 Generated with Claude Code