diff --git a/.github/workflows/release-winget.yml b/.github/workflows/release-winget.yml index a7dc62fe23b2b1..5996e1c873ffbe 100644 --- a/.github/workflows/release-winget.yml +++ b/.github/workflows/release-winget.yml @@ -35,11 +35,12 @@ jobs: $PSNativeCommandErrorActionPreference = "Stop" if ($env:TAG_NAME -eq "") { - $env:TAG_NAME = $github.release.tag_name - # Get latest release $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json + # Set the tag name environment variable + $env:TAG_NAME = $github.release.tag_name + # Get download URLs $asset_x64 = $github.release.assets | Where-Object -Property name -match '64-bit.exe$' $asset_arm64 = $github.release.assets | Where-Object -Property name -match 'arm64.exe$' @@ -71,12 +72,6 @@ jobs: "$($asset_arm64_url)|arm64|machine" ` "$($asset_arm64_url)|arm64|user" - # Manually substitute the name of the default branch in the License - # and Copyright URLs since the tooling cannot do that for us. - $shortenedVersion = $version -replace ".{4}$" - $manifestPath = dir -Path ./manifests -Filter Microsoft.Git.locale.en-US.yaml -Recurse | %{$_.FullName} - sed -i "s/vfs-[.0-9]*/vfs-$shortenedVersion/g" "$manifestPath" - # Download the token from Azure Key Vault and mask it in the logs az keyvault secret download --name ${{ secrets.WINGET_TOKEN_SECRET_NAME }} --vault-name ${{ secrets.AZURE_VAULT }} --file token.txt Write-Host -NoNewLine "::add-mask::$(Get-Content token.txt)"