Skip to content

Commit b51e9d0

Browse files
committed
Update windows.yml
1 parent 8a87ec4 commit b51e9d0

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

.github/workflows/windows.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,13 @@ jobs:
6565
$portableDir = "${{ github.workspace }}\portable"
6666
New-Item -ItemType Directory -Force -Path "$portableDir\Release" | Out-Null
6767
Copy-Item -Path "$publishDir\*" -Destination "$portableDir\Release" -Recurse
68-
$WshShell = New-Object -comObject WScript.Shell
69-
$Shortcut = $WshShell.CreateShortcut("$portableDir\${{ env.SHORT_NAME }}.lnk")
70-
$Shortcut.TargetPath = "Release\${{ env.PROJECT_NAME }}.exe"
71-
$Shortcut.Arguments = "--portable"
72-
$Shortcut.Save()
73-
New-Item -ItemType Directory -Force -Path "${{ github.workspace }}\Releases" | Out-Null
74-
Compress-Archive -Path "$portableDir\*" -DestinationPath "${{ github.workspace }}\Releases\${{ env.PROJECT_NAME }}-portable-${{ matrix.variant.arch }}.zip"
68+
$batContent = "@echo off`r`n`"%~dp0Release\${{ env.PROJECT_NAME }}.exe`" --portable"
69+
Set-Content -Path "$portableDir\${{ env.SHORT_NAME }}.bat" -Value $batContent -NoNewline
7570
- uses: actions/upload-artifact@v4
7671
with:
7772
path: ${{ github.workspace }}/inno/${{ env.INSTALLER_NAME }}.exe
7873
name: ${{ env.INSTALLER_NAME }}-${{ matrix.variant.arch }}
7974
- uses: actions/upload-artifact@v4
8075
with:
81-
path: ${{ github.workspace }}/Releases/${{ env.PROJECT_NAME }}-portable-${{ matrix.variant.arch }}.zip
76+
path: ${{ github.workspace }}/portable
8277
name: ${{ env.PROJECT_NAME }}-portable-${{ matrix.variant.arch }}

0 commit comments

Comments
 (0)