Skip to content

Support a second build/zip in pr-build-zip for dual-artifact repos - #87

Merged
lihsaa591 merged 2 commits into
masterfrom
feat/pr-build-zip-dual-artifact
Sep 14, 2026
Merged

lihsaa591 merged 2 commits into
masterfrom
feat/pr-build-zip-dual-artifact

Conversation

@lihsaa591

Copy link
Copy Markdown
Contributor

Summary

  • pr-build-zip.yml posted 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, like allcoach-pro) couldn't call the workflow twice — the second job's comment would just replace the first's.
  • Adds four optional inputs: 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 is now composed in a script step (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 parses
  • First real caller: themegrill/allcoach-pro's .github/workflows/pr-build-zip.yml (Free zip via bin/dist.sh free, Pro zip via bin/dist.sh pro, single PR comment) — will confirm end-to-end once opened there
  • Existing single-artifact callers (everest-forms, user-registration, colormag, colormag-pro, ...) unaffected — no input changes needed on their end, extra-* inputs default to empty

🤖 Generated with Claude Code

lihsaa591 and others added 2 commits September 14, 2026 17:19
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>
@lihsaa591
lihsaa591 merged commit c246bb9 into master Sep 14, 2026
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.

1 participant