You've already forked wc-licensed-product
Fix zip packaging directory structure
Some checks failed
Create Release Package / build-release (push) Failing after 1m2s
Some checks failed
Create Release Package / build-release (push) Failing after 1m2s
Copy workspace to temp directory with proper subdirectory name before creating zip to ensure correct WordPress plugin structure. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user