From 240de777a8bc080554a309215048c35cf01f1017 Mon Sep 17 00:00:00 2001 From: gsarig Date: Sun, 15 Dec 2024 02:15:05 +0200 Subject: [PATCH] Fixes an issue where the zip creates multiple copies of itself --- .github/workflows/github-release.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index fa89956..8e98ca2 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -29,12 +29,18 @@ jobs: echo "Tag: $tag" echo "tag=$tag" >> $GITHUB_ENV - - name: Prepare Plugin ZIP - run: | - plugin_name="ootb-openstreetmap" - mkdir -p "$plugin_name" - rsync -av --exclude-from='.distignore' ./ "$plugin_name/" - zip -r "${plugin_name}-${tag}.zip" "$plugin_name" + - name: Prepare Plugin ZIP + run: | + plugin_name="ootb-openstreetmap" + mkdir -p "$plugin_name" + + # Sync files but exclude the ZIP file itself and the output directory + rsync -av --exclude=".distignore" \ + --exclude="${plugin_name}-${tag}.zip" \ + --exclude="$plugin_name/" ./ "$plugin_name/" + + # Create the ZIP + zip -r "${plugin_name}-${tag}.zip" "$plugin_name" - name: Create release env: