Fix CI artifact so the downloaded plugin installs directly
CI / Coding Standards (pull_request) Successful in 52s
CI / PHPStan (pull_request) Successful in 58s
CI / Tests (PHP 8.1) (pull_request) Successful in 51s
CI / Tests (PHP 8.2) (pull_request) Successful in 49s
CI / Tests (PHP 8.3) (pull_request) Successful in 49s
CI / No Debug Code (pull_request) Successful in 2s
CI / Build Plugin Zip (pull_request) Has been skipped

Gitea/Actions re-zips artifacts on download, so uploading the built plugin
zip produced a double-wrapped archive (a zip containing a zip). WordPress
then reported "No valid plugins were found" because the upload had no
plugin folder/header at its top level.

Unpack the built zip and upload the resulting plugin folder instead, so the
downloaded artifact's top level is unsupervised-schedular/ and installs
directly via Plugins -> Add New -> Upload.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-05 12:31:29 -03:00
parent 0988655aba
commit 2011319750
+8 -1
View File
@@ -127,9 +127,16 @@ jobs:
version="$(sed -nE 's/^[[:space:]]*\*?[[:space:]]*Version:[[:space:]]*([^[:space:]]+).*/\1/p' unsupervised-schedular.php | head -1)"
echo "version=${version}" >> "$GITHUB_OUTPUT"
# Gitea/Actions re-zips artifacts on download. Upload the unpacked plugin
# folder (not the built zip) so the downloaded archive's top level is
# unsupervised-schedular/ and installs directly in WordPress. Uploading
# the zip instead double-wraps it ("No valid plugins were found").
- name: Unpack plugin for artifact
run: unzip -q "dist/unsupervised-schedular-${{ steps.meta.outputs.version }}.zip" -d artifact
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: unsupervised-schedular-${{ steps.meta.outputs.version }}
path: dist/*.zip
path: artifact/
if-no-files-found: error