Skip to content

[ci] Allow publisher checks to access GitHub drafts - #109

Merged
nhairs merged 1 commit into
nhairs:mainfrom
nhairs-bot:blue-toad/fix-draft-release-access
Oct 31, 2026
Merged

nhairs merged 1 commit into
nhairs:mainfrom
nhairs-bot:blue-toad/fix-draft-release-access

Conversation

@nhairs-bot

Copy link
Copy Markdown
Contributor

The v4.3.0.dev3 release passed build and draft staging, then failed after approval with Missing or changed release draft. The publishing job had contents: read, but GitHub only includes draft releases for callers with push access.

Grant contents: write to the approved publishing job so its readiness checks can inspect the draft and exact assets. Explain the permission in the workflow and release guide. The pypi approval gate, script-only checkout, OIDC permission, package bytes and publication order remain unchanged.

Observed failure: https://github.com/nhairs/python-json-logger/actions/runs/41155252543
GitHub permission behavior: https://docs.github.com/en/rest/releases/releases#list-releases

The failed run skipped the PyPI action and retained publication evidence with zero attestations. Its replacement build and staging succeeded after moving the unpublished tag to a new commit. Once this fix is merged, a new tag push to the corrected commit is needed: rerunning the existing tagged workflow retains its old permissions.

nhairs-bot-ref: T0027

Test Plan

  • actionlint passed for release.yml; git diff --check passed.
  • Inspected failed-job logs and retained publication evidence: upload was skipped, so this failure happened before package upload/signing.
  • Live verification of draft access and publication requires an owner-triggered corrected-tag run after merge. No tags, releases, uploads or repository settings were changed while preparing this fix.

The `v4.3.0.dev3` release passed build and draft staging, then failed after approval with `Missing or changed release draft`. The publishing job had `contents: read`, but GitHub only includes draft releases for callers with push access.

Grant `contents: write` to the approved publishing job so its readiness checks can inspect the draft and exact assets. Explain the permission in the workflow and release guide. The `pypi` approval gate, script-only checkout, OIDC permission, package bytes and publication order remain unchanged.

Observed failure: https://github.com/nhairs/python-json-logger/actions/runs/41155252543
GitHub permission behavior: https://docs.github.com/en/rest/releases/releases#list-releases

The failed run skipped the PyPI action and retained publication evidence with zero attestations. Its replacement build and staging succeeded after moving the unpublished tag to a new commit. Once this fix is merged, a new tag push to the corrected commit is needed: rerunning the existing tagged workflow retains its old permissions.

nhairs-bot-ref: T0027

## Test Plan

- actionlint passed for release.yml; git diff --check passed.
- Inspected failed-job logs and retained publication evidence: upload was skipped, so this failure happened before package upload/signing.
- Live verification of draft access and publication requires an owner-triggered corrected-tag run after merge. No tags, releases, uploads or repository settings were changed while preparing this fix.
@nhairs
nhairs merged commit 9a07106 into nhairs:main Oct 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants