fix(ci): guard release-please's PyPI-publish trigger against the truthy-string bug - #74
Merged
Merged
Conversation
…hy-string bug steps.release.outputs.releases_created is always the literal string "true" or "false" (release-please-action stringifies a JS boolean via core.setOutput), never unset. Only "" is falsy in an if: expression, so the bare output reference fired the trigger on every push to main, not just when a release was actually created -- confirmed live: it fired after PR #73 merged (a non-release push) and dispatched release.yml against the already-published v2.2.0 tag. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
Merged
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.
Summary
release-please-actionalways setssteps.release.outputs.releases_createdto the literal string"true"or"false"(it stringifies a JS boolean viacore.setOutput), never leaves it unset.if:expression, only""/''is falsy — any non-empty string, including"false", is truthy. Soif: ${{ steps.release.outputs.releases_created }}fired the "Trigger PyPI publish" step on every push tomain, not just when a release was actually created.release.ymlagainst the already-publishedv2.2.0tag: https://github.com/petercorke/machinevision-toolbox-python/actions/runs/31653000797Fix
Compare explicitly against the string
'true'.Test plan
mainthat does NOT create a release should skip the trigger step.release.yml.🤖 Generated with Claude Code