Skip to content

Commit

Permalink
fix: we need pre-releases too for deltas
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyian committed Jun 3, 2021
1 parent 24a0fd9 commit 0cbe7a1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,22 @@ jobs:
- name: Build Squirrel Release
id: build-squirrel
run: |
$baseuri = 'https://github.com/goatcorp/FFXIVQuickLauncher/releases/latest/download'
$releases = Invoke-WebRequest -Uri 'https://api.github.com/repos/goatcorp/FFXIVQuickLauncher/releases'
$current = ConvertFrom-Json -InputObject $releases.Content | Select-Object -First 1
$refver = $env:GITHUB_REF -replace '.*/'
echo "::set-output name=version::$refver"
nuget pack .\XIVLauncher.nuspec -properties version=$refver
mkdir Releases
Invoke-WebRequest -Uri $baseuri/RELEASES -OutFile .\Releases\RELEASES
$release_file = $current.assets | Where-Object -Property name -Value RELEASES -EQ
Invoke-WebRequest -Uri $release_file.browser_download_url -OutFile .\Releases\RELEASES
$latest = Select-String -Path "Releases\RELEASES" -Pattern "XIVLauncher-(.*)-.*.nupkg" | Select-Object * -Last 1
$ver = $latest.Matches.groups[1].value
Invoke-WebRequest -Uri $baseuri/XIVLauncher-$ver-delta.nupkg -OutFile .\Releases\XIVLauncher-$ver-delta.nupkg
Invoke-WebRequest -Uri $baseuri/XIVLauncher-$ver-full.nupkg -OutFile .\Releases\XIVLauncher-$ver-full.nupkg
Invoke-WebRequest -Uri $baseuri/Setup.exe -OutFile .\Releases\Setup.exe
$delta_file = $current.assets | Where-Object -Property name -Value "*delta.nupkg" -Like
Invoke-WebRequest -Uri $delta_file.browser_download_url -OutFile .\Releases\XIVLauncher-$ver-delta.nupkg
$full_file = $current.assets | Where-Object -Property name -Value "*full.nupkg" -Like
Invoke-WebRequest -Uri $full_file.browser_download_url -OutFile .\Releases\XIVLauncher-$ver-full.nupkg
$setup_file = $current.assets | Where-Object -Property name -Value "Setup.exe" -EQ
Invoke-WebRequest -Uri $setup_file.browser_download_url -OutFile .\Releases\Setup.exe
~\.nuget\packages\squirrel.windows\1.9.1\tools\Squirrel.exe --no-msi --releasify .\XIVLauncher.$refver.nupkg
Start-Sleep -s 30
rm .\Releases\XIVLauncher-$ver-delta.nupkg
Expand Down

0 comments on commit 0cbe7a1

Please sign in to comment.