From 16a8a0aff14e288c0833ce58f61cc5cf68f98a6a Mon Sep 17 00:00:00 2001 From: Developer Date: Sat, 14 Dec 2024 20:11:42 +0700 Subject: [PATCH] fix file hierarchy in release.zip also make the final release zip name better --- .github/workflows/release.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8b49b40..b177936 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,16 +29,24 @@ jobs: - name: Build run: | cd backend - go build -v -ldflags="-s -w -H=windowsgui" -trimpath -o app.exe + go build -v -ldflags="-s -w" -trimpath -o app.exe - name: Create ZIP run: | - Compress-Archive -Path backend/app.exe, backend/static/* -DestinationPath release.zip + # Create a temporary directory for the release + New-Item -ItemType Directory -Path release + # Copy executable to release dir + Copy-Item backend/app.exe release/ + # Create static directory and copy files + New-Item -ItemType Directory -Path release/static + Copy-Item backend/static/* release/static/ + # Create the final ZIP + Compress-Archive -Path release/* -DestinationPath "chat-tools-${{ github.ref_name }}.zip" - name: Create Release uses: softprops/action-gh-release@v1 with: - files: release.zip + files: chat-tools-${{ github.ref_name }}.zip name: Release ${{ github.ref_name }} draft: false prerelease: false