Skip to content

Commit fd69d71

Browse files
committed
.
1 parent a5ad96e commit fd69d71

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/package.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@ jobs:
223223
choco install wixtoolset --version 3.14.0 --allow-downgrade --no-progress --force
224224
echo "C:\Program Files (x86)\WiX Toolset v3.14\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
225225
226+
- name: Delete PowerShell module archive
227+
if: matrix.os != 'windows' && matrix.project == 'devolutions-gateway'
228+
shell: pwsh
229+
run: |
230+
$PSModuleTarFilePath = Get-ChildItem -Path $PSModuleOutputPath "DevolutionsGateway-ps-*.tar" | Select-Object -First 1
231+
Write-Host "Remove PS module archive at $PSModuleTarFilePath"
232+
Remove-Item -Path $PSModuleTarFilePath
233+
226234
- name: Sign PowerShell module contents
227235
if: matrix.os == 'windows' && matrix.project == 'devolutions-gateway'
228236
shell: pwsh
@@ -252,17 +260,16 @@ jobs:
252260
253261
$PSModuleParentPath = Split-Path $DGatewayPSModulePath -Parent
254262
255-
# For some reason, when using Compress-Archive we end up with a corrupted archive once in the release.yml workflow.
256-
# Maybe because of the double compression via the upload-artifact action?
257-
# With a tarball archive, there is no problem.
258263
Write-Host "Recreate archive at $PSModuleTarFilePath"
259264
tar -cvf "$PSModuleTarFilePath" -C "$PSModuleParentPath" DevolutionsGateway
260265
261266
# Verify the archive.
262267
Write-Host "Verify archive at $PSModuleTarFilePath"
263-
# tar -tvf "$PSModuleTarFilePath" | Out-Null
268+
tar -tvf "$PSModuleTarFilePath" | Out-Null
269+
if ($LASTEXITCODE -ne 0) {
270+
throw "tar verify failed: $PSModuleTarFilePath is invalid."
271+
}
264272
& 7z t "$PSModuleTarFilePath"
265-
266273
if ($LASTEXITCODE -ne 0) {
267274
throw "tar verify failed: $PSModuleTarFilePath is invalid."
268275
}
@@ -646,7 +653,7 @@ jobs:
646653
- name: Download artifacts
647654
uses: actions/download-artifact@v4
648655
with:
649-
name: jetsocat
656+
name: jetsocat-signed
650657
path: jetsocat/nuget/bin
651658

652659
- name: Rename artifacts

0 commit comments

Comments
 (0)