diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a5f6a63..ebc40c3 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -83,8 +83,20 @@ jobs: VERSION=${{ steps.version.outputs.version }} RELEASE_FILE="releases/${PLUGIN_NAME}-${VERSION}.zip" - # Create zip from parent directory to maintain proper subdirectory structure + # Debug: show current directory structure + echo "Current directory: $(pwd)" + echo "Contents:" + ls -la + echo "Vendor contents:" + ls -la vendor/ + + # Create temp directory structure for proper zip packaging cd .. + mkdir -p "${PLUGIN_NAME}-build" + cp -r "${GITHUB_WORKSPACE}" "${PLUGIN_NAME}-build/${PLUGIN_NAME}" + + # Create zip from temp directory + cd "${PLUGIN_NAME}-build" zip -r "${PLUGIN_NAME}/${RELEASE_FILE}" "${PLUGIN_NAME}" \ -x "${PLUGIN_NAME}/.git/*" \ -x "${PLUGIN_NAME}/.gitea/*" \ @@ -102,6 +114,10 @@ jobs: -x "${PLUGIN_NAME}/wp-plugins" \ -x "${PLUGIN_NAME}/composer.lock" + # Move zip back to original releases directory + mv "${PLUGIN_NAME}/${RELEASE_FILE}" "${GITHUB_WORKSPACE}/${RELEASE_FILE}" + cd "${GITHUB_WORKSPACE}" + echo "Created release package: ${RELEASE_FILE}" - name: Generate SHA256 checksum