Add update system
All checks were successful
Build and Upload Release (Windows EXE) / Build Windows EXE (release) Successful in 37s

This commit is contained in:
2026-01-24 01:13:19 -05:00
parent ea6eb1fd5f
commit 44fe6245b9
7 changed files with 733 additions and 22 deletions

View File

@@ -63,7 +63,27 @@ jobs:
SERVER_URL: ${{ github.server_url }}
run: |
$ErrorActionPreference = 'Stop'
$uploadUrl = "$env:SERVER_URL/api/v1/repos/$env:REPO/releases/$env:RELEASE_ID/assets?name=ProgressionLoader.exe"
# Gitea API endpoint for uploading release assets
$uploadUrl = "$env:SERVER_URL/api/v1/repos/$env:REPO/releases/$env:RELEASE_ID/assets"
Write-Host "Uploading ProgressionLoader.exe to $uploadUrl"
Invoke-RestMethod -Method Post -Uri $uploadUrl -Headers @{ Authorization = "token $env:TOKEN" } -ContentType "application/octet-stream" -InFile "ProgressionLoader.exe"
# Use multipart form data for Gitea
$boundary = [System.Guid]::NewGuid().ToString()
$LF = "`r`n"
$fileBytes = [System.IO.File]::ReadAllBytes("ProgressionLoader.exe")
$fileEnc = [System.Text.Encoding]::GetEncoding('iso-8859-1').GetString($fileBytes)
$bodyLines = (
"--$boundary",
"Content-Disposition: form-data; name=`"attachment`"; filename=`"ProgressionLoader.exe`"",
"Content-Type: application/octet-stream$LF",
$fileEnc,
"--$boundary--$LF"
) -join $LF
Invoke-RestMethod -Method Post -Uri $uploadUrl -Headers @{
Authorization = "token $env:TOKEN"
"Content-Type" = "multipart/form-data; boundary=$boundary"
} -Body $bodyLines