CI: build an installable plugin zip on tag push (fixes broken manual installs)#9
Open
swissky wants to merge 1 commit into
Open
CI: build an installable plugin zip on tag push (fixes broken manual installs)#9swissky wants to merge 1 commit into
swissky wants to merge 1 commit into
Conversation
Fixes emdash-cms#6: the GitHub "Download ZIP" of the repo nests the plugin under wp-emdash-main/plugins/, which WordPress' Upload Plugin rejects. This workflow builds emdash-exporter.zip with the plugin folder at the archive root, attaches it to a release on every v* tag, runs a PHP syntax check first, and uploads the zip as an artifact on pull requests for testing.
swissky
added a commit
to swissky/wp-emdash
that referenced
this pull request
Jul 5, 2026
…ependent review)
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.
What does this PR do?
Fixes #6.
Users who download the repo zip from GitHub get
wp-emdash-main/plugins/emdash-exporter/...— WordPress' Upload Plugin rejects that structure with no useful error, which is exactly the failure reported in #6 (the workaround in the comments is to re-zip the plugin folder manually).This adds a small GitHub Actions workflow that removes the manual step:
v*tag push: buildsemdash-exporter.zipwith the plugin folder at the archive root (the structure WordPress expects) and attaches it to a GitHub release with generated notes. The release page becomes the canonical "download the plugin here" link.php -lover all plugin files first, so a release can't ship a file with a syntax error.No changes to the plugin itself.
Carved out of #8 so it can be reviewed and merged independently — if this lands first, #8 rebases cleanly (I'll drop the duplicate file from #8).
Type of change
Testing
The zip built by the same commands (
cd plugins && zip -r ../emdash-exporter.zip emdash-exporter) has been installed repeatedly on live WordPress sites via Plugins → Add New → Upload during the migration testing for #8.AI-generated code disclosure