5 Commits

Author SHA1 Message Date
7250ec8c58 upload
All checks were successful
Build and Release / build (push) Successful in 3m26s
2026-05-17 02:35:53 -05:00
8a4eea282f upload fix 2026-05-17 02:32:51 -05:00
d63ce05d83 worker upload fix hopefully
Some checks failed
Build and Release / build (push) Failing after 3m29s
2026-05-17 02:22:18 -05:00
ec9cf435ca workflow
All checks were successful
Build and Release / build (push) Successful in 3m26s
2026-05-17 02:13:41 -05:00
580330b99e fixing workflow
Some checks failed
Build and Release / build (push) Has been cancelled
2026-05-17 02:09:14 -05:00

View File

@@ -44,54 +44,17 @@ jobs:
shell: powershell shell: powershell
run: | run: |
$releaseId = "${{ steps.create_release.outputs.release_id }}" $releaseId = "${{ steps.create_release.outputs.release_id }}"
$filePath = "target\release\tickr.exe" $filePath = (Resolve-Path "target\release\tickr.exe").Path
Write-Host "Working dir: $(Get-Location)"
Write-Host "Release ID: $releaseId"
Write-Host "File: $filePath"
if (!(Test-Path $filePath)) {
Write-Error "File not found: $filePath"
exit 1
}
$uri = "https://gitea.whitlocktech.com/api/v1/repos/whitlocktech/tickr/releases/$releaseId/assets?name=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)) & curl.exe -X POST -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" -F "attachment=@`"$filePath`"" "$uri"
$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 $uri `
-Method Post `
-Headers @{ Authorization = "token ${{ secrets.RELEASE_TOKEN }}" } `
-ContentType "multipart/form-data; boundary=$boundary" `
-Body $bodyBytes- 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 $uri `
-Method Post `
-Headers @{ Authorization = "token ${{ secrets.RELEASE_TOKEN }}" } `
-ContentType "multipart/form-data; boundary=$boundary" `
-Body $bodyBytes