diff --git a/scripts/nightly.yaml b/scripts/nightly.yaml index 932fc778e..a8fae30b2 100644 --- a/scripts/nightly.yaml +++ b/scripts/nightly.yaml @@ -358,7 +358,7 @@ stages: displayName: 'Download Win32 Build' inputs: artifactName: 'WindowsBuild-x86' - targetPath: $(Agent.TempDirectory) + targetPath: $(Agent.TempDirectory) - task: DownloadPipelineArtifact@2 displayName: 'Download ManyLinux Build' inputs: @@ -452,6 +452,15 @@ stages: inputs: artifactName: 'NuGet32' targetPath: tmp + - script: | + cd tmp + for file in *.zip; do + if [ -f "$file" ]; then + sha256sum "$file" > "$file.sha256" + echo "Generated SHA256 for $file" + fi + done + displayName: 'Generate SHA256 hashes for ZIP files' - task: GitHubRelease@1 continueOnError: true inputs: diff --git a/scripts/release.yml b/scripts/release.yml index 946b002f3..3a3979782 100644 --- a/scripts/release.yml +++ b/scripts/release.yml @@ -448,12 +448,22 @@ stages: displayName: 'Download NuGet64 Package' inputs: artifact: 'NuGet' - path: $(Agent.TempDirectory) + path: $(Agent.TempDirectory) - task: DownloadPipelineArtifact@2 displayName: 'Download NuGet32 Package' inputs: artifact: 'NuGet32' - path: $(Agent.TempDirectory) + path: $(Agent.TempDirectory) + - powershell: | + $files = Get-ChildItem -Path "$(Agent.TempDirectory)" -Filter "*.zip" + foreach ($file in $files) { + $hash = Get-FileHash -Path $file.FullName -Algorithm SHA256 + $hashString = $hash.Hash.ToLower() + " " + $file.Name + $hashFile = $file.FullName + ".sha256" + Set-Content -Path $hashFile -Value $hashString + Write-Host "Generated SHA256 for $($file.Name)" + } + displayName: 'Generate SHA256 hashes for ZIP files' - task: GitHubRelease@1 inputs: gitHubConnection: Z3Prover