Skip to content

🐛 fix(publish-github-release): create the release on the existing tag - #68

Merged
gaborbernat merged 1 commit into
mainfrom
fix/release-existing-tag
Nov 12, 2026
Merged

gaborbernat merged 1 commit into
mainfrom
fix/release-existing-tag

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

simplint's 0.11.0 release reached PyPI, but publish-github-release failed to create the GitHub Release with Resource not accessible by integration (HTTP 403), even though the job's token had Contents write. 🐛 The release built from the tag's commit for about an hour, and in that time a pull request that changed workflow files merged to main. Once this merges, a release publishes no matter what merges while it builds.

The Action named the tag's commit as the release target. As blinkbitcoin/shared-workflows#29 reproduces, GitHub then compares that commit's workflow files with the default branch tip and refuses a GITHUB_TOKEN, which never holds the workflows permission, when they differ. The create-release API ignores the target when the tag already exists, and the Action documents its tag input as an existing tag, so the draft is now created on the tag alone.

Without a target, a missing tag would end up on the default branch tip when the draft is published. The Action therefore reads the tag's commit before creating the draft and stops with tag <tag> must exist and point at <commit> when the tag is missing or names another commit. Callers change nothing.

GitHub checks a release target's workflow files against the default
branch tip and refuses GITHUB_TOKEN, which lacks the workflows
permission, once a later merge changed a workflow. simplint 0.11.0 hit
this when a CI change merged while its release built. The tag already
exists, so drop the target and stop if the tag is missing or points at
another commit.
@gaborbernat gaborbernat added the bug Something isn't working label Nov 12, 2026
@gaborbernat
gaborbernat merged commit 112e5a7 into main Nov 12, 2026
13 checks passed
@gaborbernat
gaborbernat deleted the fix/release-existing-tag branch November 12, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant