From 8e4ef1a4ac01856321e5deecf25cfd7a6507cda4 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Sun, 16 Oct 2022 12:49:11 -0700 Subject: [PATCH] Release.yml hash creation (#21254) * injecting hash * Update release.yml * Update release.yml * Update release.yml * Update release.yml * Update release.yml * Update release.yml * Update release.yml * Update release.yml * Update release.yml * Update release.yml * Update release.yml * Update release.yml why is it always a slash --- .pipelines/release.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.pipelines/release.yml b/.pipelines/release.yml index 316f2fcaed..16e79aaf19 100644 --- a/.pipelines/release.yml +++ b/.pipelines/release.yml @@ -502,10 +502,31 @@ jobs: contents: '**/PowerToysSetup-*.exe' flattenFolders: True targetFolder: $(Build.ArtifactStagingDirectory) + + - task: PowerShell@2 + displayName: 'Calculating SHA256 hash' + inputs: + targetType: 'inline' + script: | + $p = "$(System.ArtifactsDirectory)\"; + $staging = "$(Build.ArtifactStagingDirectory)\" + $hash = ((get-item $p\*.exe | Get-FileHash).Hash); + $plat = "hash_$(BuildPlatform).txt"; + $combinedPath = $staging + $plat; + + echo $plat + echo $hash + echo $p + echo $combinedPath + + $hash | out-file -filepath $combinedPath + pwsh: true - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: PowerToySetup' inputs: PathtoPublish: $(System.ArtifactsDirectory) ArtifactName: setup-$(BuildPlatform) + + ...