@@ -164,28 +164,34 @@ jobs:
164164 - name : Append tag to artifacts
165165 run : |
166166 TAG_NAME=${GITHUB_REF#refs/tags/}
167-
168- for PLATFORM in win macos linux; do
169- if [ -d "plugin-${PLATFORM}" ]; then
170- RELEASE_PATH=$(find "plugin-${PLATFORM}" -type d -name "Release" | head -n 1)
167+ REPO_NAME="${{ github.event.repository.name }}"
171168
172- if [ -n "$RELEASE_PATH" ]; then
173- echo "Packing ${PLATFORM} from ${RELEASE_PATH}..."
174- (cd "$RELEASE_PATH" && zip -r "../plugin-${PLATFORM}-${TAG_NAME}.zip" .)
175- else
176- echo "Warning: Release folder not found for ${PLATFORM}"
177- fi
178- fi
179- done
169+ MAC_RELEASE_DIR=$(find $GITHUB_WORKSPACE/artifacts/plugin-macos -type d -name "Release" | head -n 1)
170+ WIN_RELEASE_DIR=$(find $GITHUB_WORKSPACE/artifacts/plugin-win -type d -name "Release" | head -n 1)
171+ LINUX_RELEASE_DIR=$(find $GITHUB_WORKSPACE/artifacts/plugin-linux -type d -name "Release" | head -n 1)
172+
173+ DEST_DIR="$GITHUB_WORKSPACE/artifacts"
174+
175+ cd "$WIN_RELEASE_DIR"
176+ zip -r "${REPO_NAME}-win-${TAG_NAME}.zip" .
177+ cp "${REPO_NAME}-win-${TAG_NAME}.zip" "$DEST_DIR/"
178+
179+ cd "$MAC_RELEASE_DIR"
180+ zip -r "${REPO_NAME}-macos-${TAG_NAME}.zip" .
181+ cp "${REPO_NAME}-macos-${TAG_NAME}.zip" "$DEST_DIR/"
182+
183+ cd "$LINUX_RELEASE_DIR"
184+ zip -r "${REPO_NAME}-linux-${TAG_NAME}.zip" .
185+ cp "${REPO_NAME}-linux-${TAG_NAME}.zip" "$DEST_DIR/"
180186
181187 - name : Create GitHub Release
182188 uses : softprops/action-gh-release@v2
183189 with :
184190 draft : true
185191 tag_name : ${{ github.ref_name }}
186192 files : |
187- artifacts/plugin -win-*.zip
188- artifacts/plugin -macos-*.zip
189- artifacts/plugin -linux-*.zip
193+ artifacts/* -win-*.zip
194+ artifacts/* -macos-*.zip
195+ artifacts/* -linux-*.zip
190196 env :
191197 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments