steps: - download: none - template: release-SetReleaseTagAndContainerName.yml - pwsh: | $azcopy = "C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy\AzCopy.exe" & $azcopy /Source:https://$(StorageAccount).blob.core.windows.net/$(AzureVersion) /Dest:$(System.ArtifactsDirectory) /S /SourceKey:$(StorageAccountKey) displayName: Download Azure Artifacts - pwsh: | Get-ChildItem $(System.ArtifactsDirectory)\* -recurse | Select-Object -ExpandProperty Name displayName: Capture downloaded artifacts - pwsh: | git clone https://$(AzureDevOpsPat)@mscodehub.visualstudio.com/PowerShellCore/_git/Internal-PowerShellTeam-Tools '$(Pipeline.Workspace)/tools' displayName: Clone Internal-Tools repository - pwsh: | $Path = "$(System.ArtifactsDirectory)" $OutputPath = Join-Path $Path ‘hashes.sha256’ $srcPaths = @($Path) $packages = Get-ChildItem -Path $srcPaths -Include * -Recurse $checksums = $packages | ForEach-Object { Write-Verbose -Verbose "Generating checksum file for $($_.FullName)" $packageName = $_.Name $hash = (Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash.ToLower() # the '*' before the packagename signifies it is a binary "$hash *$packageName" } $checksums | Out-File -FilePath $OutputPath -Force $fileContent = Get-Content -Path $OutputPath -Raw | Out-String Write-Verbose -Verbose -Message $fileContent displayName: Add sha256 hashes - pwsh: | Import-module '$(Pipeline.Workspace)/tools/Scripts/GitHubRelease.psm1' Publish-ReleaseDraft -Tag '$(ReleaseTag)' -Name '$(ReleaseTag) Release of PowerShell' -Description '<-- Update Me -->' -User PowerShell -Repository PowerShell -PackageFolder $(System.ArtifactsDirectory) -Token $(GitHubReleasePat) displayName: Publish Release Draft