Skip to content

Commit 878c403

Browse files
committed
Revert "Generate a single file, not zip"
This reverts commit 1ceb068.
1 parent 1c5f550 commit 878c403

File tree

1 file changed

+36
-27
lines changed

1 file changed

+36
-27
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,59 +30,68 @@ jobs:
3030
- name: Setup .NET
3131
uses: actions/setup-dotnet@v4
3232
with:
33-
dotnet-version: '9.0.x'
34-
cache: true
35-
cache-dependency-path: |
36-
DesktopApp/packages.lock.json
33+
dotnet-version: '9.0.x'
34+
cache: true
35+
cache-dependency-path: |
36+
DesktopApp/packages.lock.json
3737
38-
- name: Restore
38+
- name: Restore (generate/update lock file if needed)
3939
run: dotnet restore $env:PROJECT
4040

41-
- name: Verify lock file
41+
- name: Verify lock file exists
4242
run: |
4343
if (-not (Test-Path "DesktopApp/packages.lock.json")) { Write-Error 'packages.lock.json missing'; exit 1 }
44+
type DesktopApp/packages.lock.json
4445
45-
- name: Publish single-file self-contained (win-x64)
46+
- name: Build (framework-dependent)
47+
run: dotnet build $env:PROJECT -c $env:CONFIG -f $env:FRAMEWORK --no-restore
48+
49+
- name: Publish (self-contained win-x64)
4650
run: >-
47-
dotnet publish $env:PROJECT -c $env:CONFIG -f $env:FRAMEWORK -r win-x64 --self-contained true
48-
/p:PublishSingleFile=true /p:EnableCompressionInSingleFile=true /p:PublishTrimmed=false /p:DebugType=None
49-
-o publish/self
51+
dotnet publish $env:PROJECT -c $env:CONFIG -f $env:FRAMEWORK
52+
-r win-x64 --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=false
53+
-o publish/win-x64-self
5054
51-
- name: List publish output
52-
run: dir publish/self
55+
- name: Publish (framework-dependent win-x64)
56+
run: >-
57+
dotnet publish $env:PROJECT -c $env:CONFIG -f $env:FRAMEWORK
58+
-r win-x64 --self-contained false /p:PublishSingleFile=false
59+
-o publish/win-x64-fdd
5360
54-
- name: Normalize executable name
55-
shell: pwsh
61+
- name: Zip artifacts
5662
run: |
57-
$exe = Get-ChildItem publish/self -Filter *.exe | Select-Object -First 1
58-
if (-not $exe) { Write-Error 'No exe produced'; exit 1 }
59-
Rename-Item $exe.FullName "$($exe.DirectoryName)/$env:APP_NAME.exe"
60-
dir publish/self
63+
Compress-Archive -Path publish/win-x64-self/* -DestinationPath "$env:APP_NAME-self-contained-win-x64.zip"
64+
Compress-Archive -Path publish/win-x64-fdd/* -DestinationPath "$env:APP_NAME-framework-dependent-win-x64.zip"
65+
66+
- name: Upload self-contained artifact
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: ${{ env.APP_NAME }}-self-contained-win-x64
70+
path: ${{ env.APP_NAME }}-self-contained-win-x64.zip
71+
if-no-files-found: error
6172

62-
- name: Upload executable artifact
73+
- name: Upload framework-dependent artifact
6374
uses: actions/upload-artifact@v4
6475
with:
65-
name: ${{ env.APP_NAME }}-win-x64
66-
path: publish/self/${{ env.APP_NAME }}.exe
76+
name: ${{ env.APP_NAME }}-framework-dependent-win-x64
77+
path: ${{ env.APP_NAME }}-framework-dependent-win-x64.zip
6778
if-no-files-found: error
6879

6980
release:
7081
if: startsWith(github.ref, 'refs/tags/v')
7182
needs: build
7283
runs-on: windows-latest
7384
steps:
74-
- name: Download artifact
85+
- name: Download artifacts
7586
uses: actions/download-artifact@v4
7687
with:
77-
name: iptv-desktop-browser-win-x64
7888
path: dist
79-
- name: Show files
80-
run: dir dist
81-
- name: Create Release (single exe)
89+
- name: Create Release
8290
uses: softprops/action-gh-release@v2
8391
with:
8492
files: |
85-
dist/iptv-desktop-browser.exe
93+
dist/**/iptv-desktop-browser-self-contained-win-x64.zip
94+
dist/**/iptv-desktop-browser-framework-dependent-win-x64.zip
8695
draft: false
8796
prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-alpha') }}
8897
env:

0 commit comments

Comments
 (0)