Skip to content

Commit

Permalink
6
Browse files Browse the repository at this point in the history
  • Loading branch information
sonygod committed Oct 9, 2024
1 parent 7cf91eb commit 1f1f203
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Download Haxe 4.3.6
shell: powershell
run: |
$haxeUrl = "https://haxe.org/download/file/4.3.6/haxe-4.3.6-win64.exe"
try {
# Send the initial request without following redirects
$response = Invoke-WebRequest -Uri $haxeUrl -MaximumRedirection 0 -ErrorAction Stop
} catch [System.Net.WebException] {
if ($_.Response.StatusCode -eq 302) {
# Capture the final URL from the redirect
$finalUrl = $_.Response.Headers["Location"]
if ($finalUrl) {
Write-Host "Resolved final download URL: $finalUrl"
Invoke-WebRequest -Uri $finalUrl -OutFile "haxe-install.exe"
} else {
Write-Host "Failed to resolve final URL."
exit 1
}
} else {
Write-Host "Unexpected error: $($_.Exception.Message)"
exit 1
}
}



- name: Install Haxe 4.3.6
shell: powershell
run: |
Start-Process -FilePath "haxe-install.exe" -ArgumentList "/S" -Wait # Silent install
Start-Process -FilePath "install/haxe-4.3.6-win64.exe" -ArgumentList "/S" -Wait # Silent install
- name: Add Haxe to PATH
shell: powershell
Expand Down
Binary file added install/haxe-4.3.6-win64.exe
Binary file not shown.

0 comments on commit 1f1f203

Please sign in to comment.