Skip to content

Commit a624a6c

Browse files
committed
Update Windows CI workflow to download specific GTK runtime version
1 parent 61b8261 commit a624a6c

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

.github/workflows/windows.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -116,27 +116,9 @@ jobs:
116116
if ($content -notmatch 'import site') { Add-Content -Path $pth -Value "`r`nimport site`r`n" }
117117
}
118118
119-
$api = 'https://api.github.com/repos/wingtk/gvsbuild/releases/latest'
120-
$headers = @{ 'User-Agent' = 'github-actions'; 'Authorization' = "Bearer $env:GITHUB_TOKEN" }
121-
$rel = Invoke-RestMethod -Headers $headers -Uri $api -Method GET
122-
$asset = $rel.assets |
123-
Where-Object { $_.name -match '(?i)gtk(4)?[-_]?.*(runtime|bundle).*(64|x86_64).*\.zip$' -or $_.name -match '(?i)^gtk4-runtime-64.*\.zip$' -or $_.name -match '(?i)^gtk-runtime-64.*\.zip$' } |
124-
Select-Object -First 1
125119
$gtkZip = "$env:RUNNER_TEMP\gtk-runtime.zip"
126-
if ($asset) {
127-
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $gtkZip
128-
} else {
129-
# Fallback to well-known asset names under latest/download
130-
$fallbacks = @(
131-
'https://github.com/wingtk/gvsbuild/releases/latest/download/gtk4-runtime-64.zip',
132-
'https://github.com/wingtk/gvsbuild/releases/latest/download/gtk-runtime-64.zip'
133-
)
134-
$ok = $false
135-
foreach ($u in $fallbacks) {
136-
try { Invoke-WebRequest -Uri $u -OutFile $gtkZip -ErrorAction Stop; $ok = $true; break } catch { }
137-
}
138-
if (-not $ok) { throw 'Could not download GTK runtime from gvsbuild latest release.' }
139-
}
120+
$gtkUrl = 'https://github.com/wingtk/gvsbuild/releases/download/2025.9.0/GTK4_Gvsbuild_2025.9.0_x64.zip'
121+
Invoke-WebRequest -Uri $gtkUrl -OutFile $gtkZip
140122
Expand-Archive -LiteralPath $gtkZip -DestinationPath "$stage\gtk_tmp" -Force
141123
$gtkOut = "$stage\gtk"
142124
New-Item -ItemType Directory -Force -Path $gtkOut | Out-Null
@@ -152,7 +134,7 @@ jobs:
152134
appDir = fso.GetAbsolutePathName(".")
153135
env("PATH") = appDir & "\\gtk\\bin;" & appDir & "\\python;" & env("PATH")
154136
env("PYTHONHOME") = appDir & "\\python"
155-
env("PYTHONPATH") = appDir & "\\lib\\python3.12\\site-packages"
137+
env("PYTHONPATH") = appDir & "\\lib\\python3.13\\site-packages;" & appDir & "\\lib\\python3.12\\site-packages"
156138
env("GI_TYPELIB_PATH") = appDir & "\\gtk\\lib\\girepository-1.0"
157139
env("XDG_DATA_DIRS") = appDir & "\\share;" & appDir & "\\gtk\\share"
158140
oShell.Run '"' & appDir & "\\python\\pythonw.exe" & '" -m ssh_studio.main', 0

0 commit comments

Comments
 (0)