From d70651aa14f10ea23f37e808ff8aae51340c2bfd Mon Sep 17 00:00:00 2001 From: slaveoftime Date: Tue, 7 Apr 2026 10:03:24 +0800 Subject: [PATCH 1/2] Fix actions --- .github/workflows/ci.yml | 8 ++++++++ .github/workflows/release.yml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a06a4c..f9b9aa3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,17 @@ name: CI on: pull_request: + paths: + - 'ACadSharp.Image/**' + - 'ACadSharp.Image.Cli/**' + - '.github/workflows/ci.yml' push: branches: - main + paths: + - 'ACadSharp.Image/**' + - 'ACadSharp.Image.Cli/**' + - '.github/workflows/ci.yml' jobs: test: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41f5c1d..0c72b41 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: run: dotnet pack ./ACadSharp.Image.Cli/ACadSharp.Image.Cli.csproj --configuration Release --output ./artifacts/packages -p:ContinuousIntegrationBuild=true -p:Version=${{ steps.version.outputs.value }} - name: Publish packages - run: dotnet nuget push ./artifacts/packages/*.nupkg --api-key {{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate + run: dotnet nuget push ./artifacts/packages/*.nupkg --api-key "{{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate shell: pwsh publish-native-cli: From ce37965cc3315932aa23442004ebf43a5f5ea4a9 Mon Sep 17 00:00:00 2001 From: slaveoftime Date: Tue, 7 Apr 2026 10:12:27 +0800 Subject: [PATCH 2/2] Update release artifacts --- .github/workflows/release.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c72b41..4d83936 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,13 +79,22 @@ jobs: shell: pwsh run: | $asset = "cad-to-image-${{ steps.version.outputs.value }}-${{ matrix.rid }}" + $publishDir = "./artifacts/publish/${{ matrix.rid }}" + $executableName = if ("${{ matrix.archive }}" -eq "zip") { "cad-to-image.exe" } else { "cad-to-image" } + $executablePath = Join-Path $publishDir $executableName + + if (!(Test-Path $executablePath)) + { + throw "Published executable not found at '$executablePath'." + } + if ("${{ matrix.archive }}" -eq "zip") { - Compress-Archive -Path "./artifacts/publish/${{ matrix.rid }}/*" -DestinationPath "./artifacts/$asset.zip" + Compress-Archive -Path $executablePath -DestinationPath "./artifacts/$asset.zip" } else { - tar -czf "./artifacts/$asset.tar.gz" -C "./artifacts/publish/${{ matrix.rid }}" . + tar -czf "./artifacts/$asset.tar.gz" -C $publishDir $executableName } - name: Upload release asset