From 43bc2373efc73bd3257b8978a4909df892c69627 Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Wed, 11 Feb 2026 21:13:32 +0800 Subject: [PATCH] Revert "feat: add portable ZIP archives for Windows releases (#753)" (#788) This reverts commit 6f3fd9babc3113cf8bd09086d55b6ec344995a40. --- .github/workflows/build.yml | 56 ------------------------------------- 1 file changed, 56 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 770629c..0b15252 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -366,61 +366,6 @@ jobs: src-tauri/target/${{ steps.build-profile.outputs.profile }}/bundle/rpm/*.rpm retention-days: 30 - - name: Create portable ZIP (Windows) - if: contains(inputs.platform, 'windows') - shell: pwsh - run: | - # Determine the target output directory - $target = "${{ inputs.target }}" - $profile = "${{ steps.build-profile.outputs.profile }}" - if ($target -eq "x86_64-pc-windows-msvc" -or $target -eq "") { - $targetDir = "src-tauri/target/$profile" - $arch = "x64" - } else { - $targetDir = "src-tauri/target/$target/$profile" - $arch = "arm64" - } - - $version = "${{ steps.get-version.outputs.version }}" - $prefix = "${{ inputs.asset-prefix }}" - $zipName = "${prefix}_${version}_${arch}_portable.zip" - $stagingDir = "portable-staging/Handy_${version}_${arch}_portable" - - # Create staging directory - New-Item -ItemType Directory -Force -Path $stagingDir | Out-Null - - # Copy the exe - $exePath = "$targetDir/Handy.exe" - if (-not (Test-Path $exePath)) { - Write-Error "Handy.exe not found at $exePath" - exit 1 - } - Copy-Item $exePath $stagingDir/ - - # Copy the resources directory - $resourcesPath = "$targetDir/resources" - if (Test-Path $resourcesPath) { - Copy-Item -Recurse $resourcesPath "$stagingDir/resources" - } else { - Write-Warning "Resources directory not found at $resourcesPath" - } - - # Create the zip - Compress-Archive -Path $stagingDir -DestinationPath $zipName - Write-Host "Created portable ZIP: $zipName" - echo "PORTABLE_ZIP_PATH=$zipName" >> $env:GITHUB_ENV - echo "PORTABLE_ZIP_NAME=$zipName" >> $env:GITHUB_ENV - - - name: Upload portable ZIP to release (Windows) - if: contains(inputs.platform, 'windows') && inputs.release-id != '' - shell: bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release upload "v${{ steps.get-version.outputs.version }}" "${{ env.PORTABLE_ZIP_PATH }}" \ - --repo "${{ github.repository }}" \ - --clobber - - name: Upload artifacts (Windows) if: inputs.upload-artifacts && contains(inputs.platform, 'windows') uses: actions/upload-artifact@v4 @@ -430,5 +375,4 @@ jobs: path: | src-tauri/target/${{ inputs.target != '' && inputs.target != 'x86_64-pc-windows-msvc' && format('{0}/{1}', inputs.target, steps.build-profile.outputs.profile) || steps.build-profile.outputs.profile }}/bundle/msi/*.msi src-tauri/target/${{ inputs.target != '' && inputs.target != 'x86_64-pc-windows-msvc' && format('{0}/{1}', inputs.target, steps.build-profile.outputs.profile) || steps.build-profile.outputs.profile }}/bundle/nsis/*.exe - ${{ env.PORTABLE_ZIP_NAME }} retention-days: 30