Skip to content

Commit c7e329a

Browse files
committed
fix: download simba properly
1 parent 042c49e commit c7e329a

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

.github/workflows/hash-files.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,25 @@ jobs:
99
hash-files:
1010
runs-on: windows-latest
1111
steps:
12-
- name: Fetch Simba 2 download URL
13-
shell: powershell
12+
name: Fetch Simba 2 download URL
13+
id: simba-url
1414
run: |
15-
$url = "https://raw.githubusercontent.com/Villavu/Simba-Build-Archive/main/latest.win64"
16-
$downloadUrl = (Invoke-WebRequest -Uri $url -UseBasicParsing).Content.Trim()
17-
echo "downloadUrl=$downloadUrl" >> $env:GITHUB_OUTPUT
18-
New-Item -Path ".\Includes" -ItemType Directory -Force
15+
$url = "https://raw.githubusercontent.com/Villavu/Simba-Build-Archive/refs/heads/main/latest.win64"
16+
$response = Invoke-WebRequest -Uri $url -UseBasicParsing
17+
$baseUrl = $response.Content.Trim() -replace 'Win64\.zip\?raw=true$', ''
18+
Write-Output "Base URL: $baseUrl"
19+
echo "::set-output name=baseUrl::$baseUrl"
20+
New-Item -Path ".\Includes" -ItemType Directory
1921
2022
- name: Download Simba 2.0 (64-bit)
21-
shell: powershell
2223
run: |
23-
$downloadUrl = "${{ steps.simba.outputs.downloadUrl }}"
24-
Write-Output "Downloading: $downloadUrl"
25-
Invoke-WebRequest -Uri $downloadUrl -OutFile "download.zip"
26-
Expand-Archive -Path "download.zip" -DestinationPath . -Force
27-
Remove-Item "download.zip" -Force
24+
$baseUrl = "${{ steps.simba-url.outputs.baseUrl }}"
25+
$downloadUrl = "$baseUrl" + "Win64.zip?raw=true"
26+
Write-Output "Download URL (64-bit): $downloadUrl"
27+
$outputFile = ".\download.zip"
28+
Invoke-WebRequest -Uri $downloadUrl -OutFile $outputFile
29+
Expand-Archive -Path $outputFile -DestinationPath . -Force
30+
Remove-Item -Path $outputFile -Force
2831
2932
- name: Checkout repository
3033
uses: actions/checkout@v4.2.2

0 commit comments

Comments
 (0)