File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,7 @@ jobs:
253
253
retention-days : 7
254
254
255
255
publish-winget :
256
+ name : Publish to winget-pkgs
256
257
runs-on : windows-latest
257
258
needs : release
258
259
steps :
@@ -308,18 +309,22 @@ jobs:
308
309
--submit `
309
310
--version "${version}" `
310
311
--urls "${installer_url}|X64" `
311
- --token "${{ secrets.CDRCI_GITHUB_TOKEN }} "
312
+ --token "$env:WINGET_GH_TOKEN "
312
313
313
314
env :
314
315
# For gh CLI:
315
316
GH_TOKEN : ${{ github.token }}
317
+ # For wingetcreate. We need a real token since we're pushing a commit
318
+ # to GitHub and then making a PR in a different repo.
319
+ WINGET_GH_TOKEN : ${{ secrets.CDRCI_GITHUB_TOKEN }}
316
320
317
321
- name : Comment on PR
322
+ if : ${{ !inputs.dry_run }}
318
323
run : |
319
324
# Find the PR that wingetcreate just made.
320
325
$version = "${{ needs.release.outputs.version }}".Trim('v')
321
326
$pr_list = gh pr list --repo microsoft/winget-pkgs --search "author:cdrci Coder.Coder version ${version}" --limit 1 --json number | `
322
- ConvertFrom-Json`
327
+ ConvertFrom-Json
323
328
$pr_number = $pr_list[0].number
324
329
325
330
gh pr comment --repo microsoft/winget-pkgs "${pr_number}" --body "🤖 cc: @deansheather @matifali"
You can’t perform that action at this time.
0 commit comments