Attach plugin zip to GitHub Release via wp dist-archive - #290
Merged
Conversation
Builds the production zip with wp-cli's dist-archive-command (the same tool used for manual releases, honouring .distignore) and uploads it as an asset on the GitHub Release once published, so the plugin can be installed straight from the Releases page. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
--filename-format is silently ignored when <target> names a file, so switch to a directory target with --create-target-dir. Also bumps dist-archive-command to ^3.0 (a tagged release), the minimum version that supports --filename-format. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The PR's own test plan flagged this as unverified: nothing exercises the workflow end to end without publishing a real release. A manual tag_name input lets it be re-run against an already-published release (re-checking out that tag) to confirm the zip actually gets attached. Also drops the now-redundant mkdir -p dist: --create-target-dir already creates the target directory.
This was referenced Sep 7, 2026
Castellon-ACM
added a commit
that referenced
this pull request
Sep 7, 2026
) The workflow #290 merged failed end to end when actually run — verified live against the real 1.5.2 release via the new workflow_dispatch trigger this commit adds. - Real bug (fatal): wp package install failed every time with "Your github oauth token for github.com contains invalid characters". shivammathur/setup-php writes a github-oauth token into Composer's global auth.json (to dodge GitHub API rate limits during its own setup) that this Composer version's own validation rejects as malformed. Fixed by unsetting that config entry before installing dist-archive-command — a public package, no auth needed. - Real bug (packaging): the produced zip contained an empty frontblocks/dist/ folder. wp dist-archive's own --create-target-dir output (./dist) lived inside the plugin directory being archived, and .distignore has no entry for it, so it got swept into the zip. Fixed by building into runner.temp instead, entirely outside the checkout. - Adds workflow_dispatch with a tag_name input so this can be tested against an already-published release without cutting a new one — this is how both bugs above were actually found and fixed. Verified: downloaded frontblocks-1.5.2.zip after a successful run — 231 files, single top-level frontblocks/ folder, no dist/ entry, no composer.json/package.json/node_modules/tests/.github.
4 tasks
Contributor
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
{name}-{version}.zip(e.g. frontblocks-1.5.2.zip) via --filename-format, and uploaded as an asset on the GitHub Release that triggered the run.Notes
Test plan
🤖 Generated with Claude Code