File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,35 @@ jobs:
165165 runs-on : windows-latest
166166
167167 steps :
168+ - name : Upgrade Git for Windows to latest (pre)release
169+ # This upgrades Git to work around https://github.com/GitoxideLabs/gitoxide/issues/1849.
170+ # TODO: Remove this step once the runner image has Git 2.49.0 or higher.
171+ env :
172+ GH_TOKEN : ${{ github.token }}
173+ run : |
174+ $workingDir = '~/git-dl'
175+ $repo = 'git-for-windows/git'
176+ $pattern = 'Git-*-64-bit.exe'
177+ $log = 'setup-log.txt'
178+ # Inno Setup args reference: https://jrsoftware.org/ishelp/index.php?topic=setupcmdline
179+ $arguments = @(
180+ '/VERYSILENT',
181+ '/SUPPRESSMSGBOXES',
182+ '/ALLUSERS',
183+ "/LOG=$log",
184+ '/NORESTART',
185+ '/CLOSEAPPLICATIONS',
186+ '/FORCECLOSEAPPLICATIONS'
187+ )
188+
189+ mkdir $workingDir | Out-Null
190+ cd $workingDir
191+ $newestTag = gh release list --repo $repo --limit 1 --json tagName --jq '.[0].tagName'
192+ gh release download $newestTag --repo $repo --pattern $pattern
193+ $installer = Get-Item $pattern
194+ Start-Process -FilePath $installer -ArgumentList $arguments -NoNewWindow -Wait
195+ Get-Content -Path $log -Tail 50
196+ git version
168197 - uses : actions/checkout@v4
169198 - uses : dtolnay/rust-toolchain@stable
170199 - uses : Swatinem/rust-cache@v2
You can’t perform that action at this time.
0 commit comments