3 Commits

Author SHA1 Message Date
580330b99e fixing workflow
Some checks failed
Build and Release / build (push) Has been cancelled
2026-05-17 02:09:14 -05:00
d32fa5c91f fixing workflow 2026-05-17 02:06:44 -05:00
acdeadb06a worker update
Some checks failed
Build and Release / build (push) Failing after 3m30s
2026-05-17 01:59:09 -05:00

View File

@@ -38,19 +38,33 @@ jobs:
} `
-Body $body
echo "release_id=$($response.id)" >> $env:GITHUB_OUTPUT
"release_id=$($response.id)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
- name: Upload binary asset
shell: powershell
run: |
$releaseId = "${{ steps.create_release.outputs.release_id }}"
$filePath = "target\release\tickr.exe"
$uri = "https://gitea.whitlocktech.com/api/v1/repos/whitlocktech/tickr/releases/$releaseId/assets?name=tickr.exe"
$fileBytes = [System.IO.File]::ReadAllBytes((Resolve-Path $filePath))
$boundary = [System.Guid]::NewGuid().ToString()
$LF = "`r`n"
$bodyLines = @(
"--$boundary",
"Content-Disposition: form-data; name=`"attachment`"; filename=`"tickr.exe`"",
"Content-Type: application/octet-stream",
"",
[System.Text.Encoding]::Latin1.GetString($fileBytes),
"--$boundary--"
)
$bodyBytes = [System.Text.Encoding]::Latin1.GetBytes($bodyLines -join $LF)
Invoke-RestMethod `
-Uri "https://gitea.whitlocktech.com/api/v1/repos/whitlocktech/tickr/releases/$releaseId/assets?name=tickr.exe" `
-Uri $uri `
-Method Post `
-Headers @{
Authorization = "token ${{ secrets.RELEASE_TOKEN }}"
} `
-InFile $filePath `
-ContentType "application/octet-stream"
-Headers @{ Authorization = "token ${{ secrets.RELEASE_TOKEN }}" } `
-ContentType "multipart/form-data; boundary=$boundary" `
-Body $bodyBytes