Skip to content

CI: build an installable plugin zip on tag push (fixes broken manual installs)#9

Open
swissky wants to merge 1 commit into
emdash-cms:mainfrom
swissky:feat/release-zip-workflow
Open

CI: build an installable plugin zip on tag push (fixes broken manual installs)#9
swissky wants to merge 1 commit into
emdash-cms:mainfrom
swissky:feat/release-zip-workflow

Conversation

@swissky

@swissky swissky commented Jul 5, 2026

Copy link
Copy Markdown

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:

  • On every v* tag push: builds emdash-exporter.zip with 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.
  • On pull requests: uploads the same zip as a build artifact, so changes can be install-tested before merging.
  • Runs php -l over 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

  • Bug fix
  • CI / tooling
  • New feature
  • Documentation

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

  • Parts of this PR were written with AI assistance (Cursor, Claude) and reviewed by a human.

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
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.

Plugin installation failed

1 participant