From b29cea082f8f04674bd222c60ed2985dc241ed42 Mon Sep 17 00:00:00 2001 From: JusterZhu Date: Wed, 20 May 2026 21:02:01 +0800 Subject: [PATCH 1/2] fix: correct artifact paths and simplify zip packaging - Use shorter artifact names (win-x64, linux-x64) - Use working-directory + zip ../name.zip * for robust packaging - Add debug step to verify file structure --- .github/workflows/publish.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7720fc4..dff7623 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Publish +name: Publish on: workflow_dispatch: @@ -21,10 +21,10 @@ jobs: -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained -o publish/win-x64 - - name: Upload win artifact + - name: Upload uses: actions/upload-artifact@v4 with: - name: GeneralUpdate.Tools-win-x64 + name: win-x64 path: publish/win-x64/GeneralUpdate.Tools.exe build-linux: @@ -44,10 +44,10 @@ jobs: -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained -o publish/linux-x64 - - name: Upload linux artifact + - name: Upload uses: actions/upload-artifact@v4 with: - name: GeneralUpdate.Tools-linux-x64 + name: linux-x64 path: publish/linux-x64/GeneralUpdate.Tools release: @@ -58,21 +58,28 @@ jobs: steps: - uses: actions/download-artifact@v4 + - name: Show structure (debug) + run: find . -type f + - name: Get timestamp id: ts run: echo "timestamp=$(date -u '+%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT - - name: Package zips + - name: Build + working-directory: win-x64 + run: zip ../GeneralUpdate.Tools_${{ steps.ts.outputs.timestamp }}_win-x64.zip * + + - name: Build + working-directory: linux-x64 run: | - chmod +x GeneralUpdate.Tools-linux-x64/GeneralUpdate.Tools - cd GeneralUpdate.Tools-win-x64 && zip ../../GeneralUpdate.Tools_${{ steps.ts.outputs.timestamp }}_win-x64.zip GeneralUpdate.Tools.exe && cd .. - cd GeneralUpdate.Tools-linux-x64 && zip ../../GeneralUpdate.Tools_${{ steps.ts.outputs.timestamp }}_linux-x64.zip GeneralUpdate.Tools && cd .. + chmod +x * + zip ../GeneralUpdate.Tools_${{ steps.ts.outputs.timestamp }}_linux-x64.zip * - name: Create Release uses: softprops/action-gh-release@v2 with: tag_name: v${{ steps.ts.outputs.timestamp }} - name: Release ${{ steps.ts.outputs.timestamp }} + name: GeneralUpdate.Tools ${{ steps.ts.outputs.timestamp }} files: | GeneralUpdate.Tools_${{ steps.ts.outputs.timestamp }}_win-x64.zip GeneralUpdate.Tools_${{ steps.ts.outputs.timestamp }}_linux-x64.zip From 56d6494b06e882236bbf450c2a791641f3f5ab2b Mon Sep 17 00:00:00 2001 From: JusterZhu Date: Wed, 20 May 2026 21:16:32 +0800 Subject: [PATCH 2/2] fix: remove PublishTrimmed, add native library self-extract - Avalonia relies on reflection, trimming breaks runtime - IncludeNativeLibrariesForSelfExtract bundles native deps - IncludeAllContentForSelfExtract ensures Avalonia resources work --- .github/workflows/publish.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dff7623..233b252 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,7 +18,9 @@ jobs: run: > dotnet publish src/GeneralUpdate.Tools.csproj -c Release -r win-x64 - -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained + -p:PublishSingleFile=true --self-contained + -p:IncludeNativeLibrariesForSelfExtract=true + -p:IncludeAllContentForSelfExtract=true -o publish/win-x64 - name: Upload @@ -41,7 +43,9 @@ jobs: run: > dotnet publish src/GeneralUpdate.Tools.csproj -c Release -r linux-x64 - -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained + -p:PublishSingleFile=true --self-contained + -p:IncludeNativeLibrariesForSelfExtract=true + -p:IncludeAllContentForSelfExtract=true -o publish/linux-x64 - name: Upload