From 4d6b276dd49c3a53dd81a984f9d98c534ed284f9 Mon Sep 17 00:00:00 2001 From: Wei Lin Date: Tue, 15 Sep 2026 21:33:25 +0800 Subject: [PATCH] Make release CLI packaging idempotent --- .github/workflows/release.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 61ef78a..7ced7d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,9 +86,11 @@ jobs: shell: pwsh run: | $asset = "miniexcel-cli-$env:RELEASE_TAG-windows-x64.zip" - New-Item -ItemType Directory -Path target/release-cli | Out-Null - Copy-Item LICENSE, README.md, target/release/miniexcel.exe target/release-cli/ - Compress-Archive -Path target/release-cli/* -DestinationPath "target/$asset" + $staging = Join-Path $env:RUNNER_TEMP 'release-cli' + Remove-Item $staging -Recurse -Force -ErrorAction SilentlyContinue + New-Item -ItemType Directory -Path $staging | Out-Null + Copy-Item LICENSE, README.md, target/release/miniexcel.exe $staging + Compress-Archive -Path "$staging/*" -DestinationPath "target/$asset" -Force - uses: actions/upload-artifact@v4 with: name: release-cli