Skip to content

Commit fa386bb

Browse files
authored
Merge pull request #23 from mini-software/fix/release-cli-staging
Make release CLI packaging idempotent
2 parents 8e3392e + 4d6b276 commit fa386bb

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ jobs:
8686
shell: pwsh
8787
run: |
8888
$asset = "miniexcel-cli-$env:RELEASE_TAG-windows-x64.zip"
89-
New-Item -ItemType Directory -Path target/release-cli | Out-Null
90-
Copy-Item LICENSE, README.md, target/release/miniexcel.exe target/release-cli/
91-
Compress-Archive -Path target/release-cli/* -DestinationPath "target/$asset"
89+
$staging = Join-Path $env:RUNNER_TEMP 'release-cli'
90+
Remove-Item $staging -Recurse -Force -ErrorAction SilentlyContinue
91+
New-Item -ItemType Directory -Path $staging | Out-Null
92+
Copy-Item LICENSE, README.md, target/release/miniexcel.exe $staging
93+
Compress-Archive -Path "$staging/*" -DestinationPath "target/$asset" -Force
9294
- uses: actions/upload-artifact@v4
9395
with:
9496
name: release-cli

0 commit comments

Comments
 (0)