Support a second build/zip in pr-build-zip for dual-artifact repos - #87
Merged
Merged
Conversation
Some repos (e.g. a Free+Pro pair consolidated into one repo) produce two distinct distributable zips from a single PR build. The reusable workflow could only track one PR comment (hardcoded marker), so calling it twice would have the second job's comment silently clobber the first's. Adds optional extra-build-command/extra-zip-glob/label/extra-label inputs: when unset (every existing caller), behavior is unchanged. When set, both zips are built, uploaded, and listed in the SAME comment. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
bin/dist.sh-style repos often produce both artifacts from ONE invocation (and running it twice can even delete the first one, since some dist scripts start with a clean of their output dir). Gating "locate/upload the extra zip" on extra-zip-glob instead of extra-build-command lets a caller set only extra-zip-glob when a single build-command already makes both. Co-Authored-By: Claude Sonnet 5 <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.
Summary
pr-build-zip.ymlposted exactly one PR comment per PR (hardcoded marker<!-- tg-autopilot: pr-build-zip -->). A repo needing two distinct zips from one build (e.g. a Free+Pro pair consolidated into a single repo, likeallcoach-pro) couldn't call the workflow twice — the second job's comment would just replace the first's.label,extra-build-command,extra-zip-glob,extra-label. Left unset (every current caller), behavior is byte-for-byte unchanged. Set them, and the job builds/uploads a second artifact and lists both in the one PR comment.comment-body.md) rather than an inline template, so the one-vs-two-artifact cases share logic instead of a nested YAML ternary.Test plan
python3 -c "import yaml; yaml.safe_load(...)"— YAML parsesthemegrill/allcoach-pro's.github/workflows/pr-build-zip.yml(Free zip viabin/dist.sh free, Pro zip viabin/dist.sh pro, single PR comment) — will confirm end-to-end once opened thereeverest-forms,user-registration,colormag,colormag-pro, ...) unaffected — no input changes needed on their end,extra-*inputs default to empty🤖 Generated with Claude Code