-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cli#3801 from Vishesh-Gupta/automate-winget-release
Automate packaging for Winget
- Loading branch information
1 parent
dd3aac7
commit 4d20aa7
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,3 +197,18 @@ jobs: | |
GIT_AUTHOR_NAME: cli automation | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
- name: Bump Winget manifest | ||
shell: pwsh | ||
env: | ||
WINGETCREATE_VERSION: v0.2.0.29-preview | ||
GITHUB_TOKEN: ${{ secrets.UPLOAD_GITHUB_TOKEN }} | ||
run: | | ||
$tagname = $env:GITHUB_REF.Replace("refs/tags/", "") | ||
$version = $tagname.Replace("v", "") | ||
$url = "https://github.com/cli/cli/releases/download/${tagname}/gh_${version}_windows_amd64.msi" | ||
iwr https://github.com/microsoft/winget-create/releases/download/${env:WINGETCREATE_VERSION}/wingetcreate.exe -OutFile wingetcreate.exe | ||
.\wingetcreate.exe update GitHub.cli --url $url --version $version | ||
if ($version -notmatch "-") { | ||
.\wingetcreate.exe submit .\manifests\g\GitHub\cli\${version}\ --token $env:GITHUB_TOKEN | ||
} |