From 2be258bed50debb28ca6b27d5cc95374c0e8694b Mon Sep 17 00:00:00 2001 From: Tony Qu Date: Wed, 1 Apr 2026 02:44:18 +0800 Subject: [PATCH] Publish self-contained single-file exe for release --- .github/workflows/build-release.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index da8b323..5da7818 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -20,20 +20,14 @@ jobs: with: dotnet-version: '8.0' - - name: Build Release - run: dotnet build -c Release + - name: Publish Release + run: dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o publish - name: Upload artifact uses: actions/upload-artifact@v4 with: name: JavaToCSharp-Release - path: bin/Release/net8.0/JavaToCSharp.dll - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: JavaToCSharp-Release - path: bin/Release/JavaToCSharp.exe + path: publish/JavaToCSharp.exe release: needs: build