-
Notifications
You must be signed in to change notification settings - Fork 874
Create winget-submission.yml #3729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Submit package to Windows Package Manager Community Repository | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
version: "$(git describe --tags --abbrev=0)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For consistency we should stick to |
||
packageFileName: coder_${version}_windows_amd64.zip | ||
packageId: Coder.Coder # Most probably the id of coder package | ||
Comment on lines
+7
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These env vars should be in |
||
|
||
jobs: | ||
|
||
winget: | ||
name: Publish winget package | ||
runs-on: windows-latest | ||
steps: | ||
- name: Submit package to Windows Package Manager Community Repository | ||
run: | | ||
deansheather marked this conversation as resolved.
Show resolved
Hide resolved
|
||
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe | ||
$github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json | ||
$installerUrl = $github.release.assets | Where-Object -Property name -match ${env:packageFileName} | Select -ExpandProperty browser_download_url -First 1 | ||
.\wingetcreate.exe update ${env:packageId} -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.Project_PAT }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just be called
submit-packages.yml
and"Submit packages"
so we can use it for other package managers in the future