Skip to content

Commit b2ea0fb

Browse files
CopilotMte90
andcommitted
Extract plugin contents before artifact upload
- Extract the plugin ZIP contents to a directory - Upload the directory instead of the ZIP file - GitHub Actions will create a single ZIP from the contents - This eliminates the double-zip issue completely Co-authored-by: Mte90 <403283+Mte90@users.noreply.github.com>
1 parent bf4255f commit b2ea0fb

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/kotlin-ci.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,23 @@ jobs:
7373
path: gradle-build.log
7474
if: always()
7575

76-
- name: Rename plugin artifact
76+
- name: Prepare plugin artifact for upload
7777
run: |
7878
cd ide-plugins/build/distributions
7979
PLUGIN_FILE=$(ls *.zip | head -n 1)
80-
if [ -n "$PLUGIN_FILE" ] && [ "$PLUGIN_FILE" != "intellij-plugin.zip" ]; then
81-
mv "$PLUGIN_FILE" intellij-plugin.zip
80+
if [ -n "$PLUGIN_FILE" ]; then
81+
# Create a temporary directory for extraction
82+
mkdir -p plugin-extracted
83+
# Extract the plugin zip
84+
unzip -q "$PLUGIN_FILE" -d plugin-extracted/
85+
# Remove the original zip
86+
rm "$PLUGIN_FILE"
8287
fi
8388
if: success()
8489

8590
- name: Upload plugin artifact
8691
uses: actions/upload-artifact@v4
8792
with:
8893
name: intellij-plugin-pr-${{ github.event.pull_request.number || github.run_number }}
89-
path: ide-plugins/build/distributions/intellij-plugin.zip
94+
path: ide-plugins/build/distributions/plugin-extracted/
9095
if: success()

0 commit comments

Comments
 (0)