3232 with :
3333 fetch-depth : 0
3434
35+ - name : Ensure releases.properties from main branch
36+ run : |
37+ # For PRs, ensure we're checking releases.properties from main branch
38+ if [ "${{ github.event_name }}" = "pull_request" ]; then
39+ echo "Fetching releases.properties from main branch..."
40+ git fetch origin main:main
41+ git checkout main -- releases.properties || echo "Could not fetch releases.properties from main"
42+ fi
43+
3544 - name : Detect Versions to Test
3645 id : detect
3746 run : |
@@ -189,6 +198,8 @@ jobs:
189198 steps :
190199 - name : Checkout Repository
191200 uses : actions/checkout@v4
201+ with :
202+ fetch-depth : 0
192203
193204 - name : Create Test Results Directory
194205 run : |
@@ -198,6 +209,8 @@ jobs:
198209 - name : Phase 1.1 - Download and Extract Python
199210 id : download-python
200211 continue-on-error : true
212+ env :
213+ GITHUB_TOKEN : ${{ secrets.GH_PAT }}
201214 run : |
202215 $ErrorActionPreference = "Stop"
203216 $version = "${{ matrix.version }}"
@@ -244,7 +257,18 @@ jobs:
244257 Write-Host "Target file: $downloadPath"
245258
246259 try {
247- Invoke-WebRequest -Uri $downloadUrl -OutFile $downloadPath -UseBasicParsing -TimeoutSec 300
260+ # Try download with GitHub token for authentication (helps with pre-releases)
261+ $headers = @{}
262+ if ($env:GITHUB_TOKEN) {
263+ $headers["Authorization"] = "token $env:GITHUB_TOKEN"
264+ Write-Host "Using GitHub token for authentication"
265+ }
266+
267+ if ($headers.Count -gt 0) {
268+ Invoke-WebRequest -Uri $downloadUrl -OutFile $downloadPath -Headers $headers -UseBasicParsing -TimeoutSec 300
269+ } else {
270+ Invoke-WebRequest -Uri $downloadUrl -OutFile $downloadPath -UseBasicParsing -TimeoutSec 300
271+ }
248272 } catch {
249273 Write-Host "❌ ERROR: Download failed!"
250274 Write-Host "Error details: $($_.Exception.Message)"
0 commit comments