Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ jobs:
runs-on: windows-latest # Action can only run on Windows
if: ${{ !github.event.release.prerelease }} # Only publish stable releases to WinGet
steps:
- name: Sync winget-pkgs fork with upstream
continue-on-error: true # wingetcreate also attempts a sync; don't fail the run on a transient API error
env:
GH_TOKEN: ${{ secrets.WINGET_TOKEN }}
run: |
# wingetcreate can only fast-forward a fork that is not too far behind upstream.
# A fork left untouched between releases falls thousands of commits behind and the
# submit step then fails with "The forked repository could not be synced with the
# upstream commits." Sync it up front so wingetcreate always sees a current fork.
$owner = (gh api user --jq '.login')
Write-Host "Syncing $owner/winget-pkgs with microsoft/winget-pkgs..."
gh api -X POST "repos/$owner/winget-pkgs/merge-upstream" -f branch=master

- name: Publish Intelligent Terminal
run: |
$assets = '${{ toJSON(github.event.release.assets) }}' | ConvertFrom-Json
Expand Down
Loading