-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
Add GitHub Action to Update the Windows installer to Winget #500
Add GitHub Action to Update the Windows installer to Winget #500
Conversation
Blocked due to #499 |
This is now open on microsoft/winget-pkgs#131370 but has a "no-executable" block. I have commented and hopefully we can get it past the reviewer. |
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.
we can certainly add this
and thank you very much for the contribution
i have a couple questions
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 'obs-backgroundremoval-*-windows-x64-Installer.exe' | Select -ExpandProperty browser_download_url -First 1 | ||
.\wingetcreate.exe update RoyShilkrot.obs-backgroundremoval -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.UPDATETHIS_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.
is this secrets.UPDATETHIS_PAT
needed somewhere?
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.
Yes, I can change it to the same that you want, but it should be a build variable with a PAT token that has "public_repo" permission
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.
can you explain the PAT token? is this something that Winget expects? i would need to sign up somewhere to get it?
i can add it as a repo secret
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.
Its a GitHub PAT token. Winget-Create creates a Pull Request on Github for the submission.
Yes, you would create a classic PAT and add it as a secret on the repo. Then update the "secret."
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.
@royshil do you have a variable name for your secret that I can use?
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.
i don't have a PAT yet
what sort of permissions does the PAT need though? i'd like to avoid the less secured "classic" PATs
i can create one and add it as a secret
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.
It only needs "public_repo"
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.
Co-authored-by: Kaito Udagawa <umireon@gmail.com>
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.
Can you fix this file path? I don't think your file will work because this is placed under the wrong path.
@umireon, what path would you like the file under? I used the same format as your existing actions. |
The |
@umireon DONE |
I don't think that the organization PAT can create PR. |
I use a non-expiring personal token. |
@royshil ping |
Co-authored-by: Kaito Udagawa <umireon@gmail.com>
Co-authored-by: Kaito Udagawa <umireon@gmail.com>
i cretaed a PAT and added it as a secret |
how do we test if this works without having to publish a release? |
You can't. You could add an additional release type to allow manual triggering of it, but it would not have the release context. |
ok well this is all set on the repo secrets side |
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.
i'm ok with landing this
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.
lgtm
This should only be merged once microsoft/winget-pkgs#131370 has been approved and it will update this package based on each GitHub Release.