Fix attach-release-zip workflow: broken composer auth + packaged empty dist/ - #292
Merged
Merged
Conversation
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.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
This was referenced Sep 7, 2026
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 #290 merged a workflow that turned out to be broken end-to-end — verified live against the real
1.5.2release via the newworkflow_dispatchtrigger this PR adds:wp package installfailed every time withYour github oauth token for github.com contains invalid characters. Root cause:shivammathur/setup-phpwrites agithub-oauthtoken into Composer's globalauth.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 installingdist-archive-command— this repo's public package install doesn't need authentication anyway.frontblocks/dist/folder.wp dist-archive's own--create-target-diroutput (./dist) lived inside the plugin directory being archived, and.distignorehas no entry for it, so it got swept into the zip. Fixed by building into${{ runner.temp }}/dist, outside the checkout entirely.workflow_dispatchwith atag_nameinput so this workflow can be tested against an already-published release without cutting a new one — this is how both bugs above were actually found and confirmed fixed, rather than discovered on the next real release.Test plan
1.5.2release, iterated until greenfrontblocks-1.5.2.zipasset and confirmed: 231 files, single top-levelfrontblocks/folder, nodist/entry, nocomposer.json/package.json/node_modules/tests//.github