PowerShell/tools/releaseBuild/azureDevOps/templates/release-CreateGitHubDraft.yml
Travis Plunk 9eb63debcd
Add sha256 hashes to release (#16147)
* Add sha256 hashes to release

* Update tools/releaseBuild/azureDevOps/templates/release-CreateGitHubDraft.yml
2021-09-23 17:31:57 -07:00

34 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
$null = New-Item $OutputPath -ItemType File -Force
foreach ($file in Get-ChildItem -Path $Path -File ){
Get-FileHash -Algorithm SHA256 -Path $file |
ForEach-Object { "$($_.Hash) *$($file.Name)" } |
Out-File -Path $OutputPath -Append
}
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