ci: put the downloads in the 'latest' release, not just the pointer
'latest' held only manifest.json, which serves the launcher but not a person: it sits at the top of the Releases page with nothing to click, so a friend has to know to scroll past it to a build tagged with a timestamp. That is the exact friction this feed exists to remove. It now carries the client and launcher zips as well, and its body says plainly which file to download and what to do with it. Storage cost is flat, not per build: 'latest' is deleted and recreated each publish, so it is one extra copy at any time rather than one per release.
This commit is contained in:
parent
172bcc2183
commit
a3b0455f59
1 changed files with 12 additions and 5 deletions
|
|
@ -178,7 +178,7 @@ jobs:
|
|||
$body = @{
|
||||
tag_name = 'latest'
|
||||
name = "Update feed -> $env:TAG"
|
||||
body = "Pointer the launcher polls. The downloads live in the ``$env:TAG`` release."
|
||||
body = "**Download ``launcher-win-x64.zip``**, unzip it, and run ``acdream-launcher.exe``. It installs the game and keeps itself and the client up to date.`n`nThis is build ``$env:TAG``."
|
||||
draft = $false
|
||||
prerelease = $false
|
||||
target_commitish = 'main'
|
||||
|
|
@ -186,10 +186,17 @@ jobs:
|
|||
$pointer = Invoke-RestMethod -Method Post -Uri "$api/releases" -Headers $headers `
|
||||
-ContentType 'application/json' -Body $body
|
||||
|
||||
Invoke-RestMethod -Method Post -Headers $headers `
|
||||
-Uri "$api/releases/$($pointer.id)/assets?name=manifest.json" `
|
||||
-Form @{ attachment = Get-Item bin/manifest.json } | Out-Null
|
||||
Write-Host "latest pointer now advertises $env:TAG"
|
||||
# Upload the payloads here too, not just the manifest. `latest` is the
|
||||
# top of the Releases page and the first thing a person sees; a
|
||||
# pointer-only release gives them nothing to click and makes them hunt
|
||||
# for a build tagged with a timestamp. The launcher only needs
|
||||
# manifest.json, but a friend needs launcher-win-x64.zip.
|
||||
foreach ($f in Get-ChildItem bin -File) {
|
||||
Invoke-RestMethod -Method Post -Headers $headers `
|
||||
-Uri "$api/releases/$($pointer.id)/assets?name=$($f.Name)" `
|
||||
-Form @{ attachment = Get-Item $f.FullName } | Out-Null
|
||||
}
|
||||
Write-Host "latest now carries $env:TAG and its downloads"
|
||||
|
||||
- name: Prune old releases
|
||||
shell: pwsh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue