Skip to content

Commit 316f849

Browse files
committed
Fix. Workflow. Make the zip with subfolder instead of zip-root.
1 parent d3543eb commit 316f849

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/dev-fix-zip.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919

20-
- name: Install p7zip
21-
run: sudo apt-get update && sudo apt-get install -y p7zip-full
20+
- name: Install dependencies
21+
run: sudo apt-get update && sudo apt-get install -y p7zip-full rsync
2222

2323
- name: Set plugin name
2424
run: echo "PLUGIN_NAME=cleantalk-spam-protect" >> $GITHUB_ENV
@@ -55,8 +55,15 @@ jobs:
5555
.*
5656
EOF
5757
58-
- name: Create ZIP archive with 7z
59-
run: 7z a -tzip "${PLUGIN_NAME}.zip" . [email protected]
58+
- name: Prepare plugin directory
59+
run: |
60+
mkdir "${PLUGIN_NAME}"
61+
rsync -a ./ "${PLUGIN_NAME}/" \
62+
--exclude-from=.7zignore \
63+
--exclude="${PLUGIN_NAME}"
64+
65+
- name: Create ZIP archive
66+
run: 7z a -tzip "${PLUGIN_NAME}.zip" "${PLUGIN_NAME}"
6067

6168
- name: Create / update GitHub Release and upload asset
6269
uses: softprops/action-gh-release@v2
@@ -74,7 +81,8 @@ jobs:
7481

7582
- name: Clean up
7683
run: |
84+
rm -rf "${PLUGIN_NAME}"
7785
rm -f "${PLUGIN_NAME}.zip"
7886
if [ "${{ steps.check_ignore.outputs.ignore_exists }}" = "false" ]; then
7987
rm -f .7zignore
80-
fi
88+
fi

0 commit comments

Comments
 (0)