ref: 65d329e674a7a01fff1bda9a6eb9ab0927bd531e
parent: f760e7a913ad094c1e73b4564752b2db43acab31
author: penny <penny@limitedideas.org>
date: Tue Oct 21 10:09:01 EDT 2025
use forgjo releases for releash script
--- a/web/release.sh
+++ b/web/release.sh
@@ -1,7 +1,6 @@
#!/bin/sh
set -e
cd ./downloads
-git checkout 418448b8a65c9137699180eb93df8e4d9387e1f7
echo "Building Linux"
GOOS=linux GOARCH=amd64 go build -o ./linux/hell ../../.
echo "Building Mac"
@@ -9,8 +8,53 @@
echo "Building Windows"
GOOS=windows GOARCH=amd64 go build -o ./win/hell.exe ../../.
echo "Building Plan9"
-mkdir plan9
GOOS=plan9 GOARCH=amd64 go build -o ./plan9/hell ../../.
-git add .
-git commit -a -m "upload binaries"
-git push --force origin HEAD:main
+
+
+key=$(cat ~/.helltoken)
+hash=$(git rev-parse --short HEAD)
+
+release_id=$(curl -X 'POST' \
+ 'https://codeberg.org/api/v1/repos/penny64/hellclient/releases' \
+ -H 'accept: application/json' \
+ -H "Authorization: token $key" \
+ -H 'Content-Type: application/json' \
+ -d '{+ "body": "Generated AMD64 release",
+ "name": "hell for mastodon",
+ "tag_name": "418448b-1761015659"
+}' | jq -r .id)
+
+echo $release_id
+
+echo "Upload Plan 9"
+curl -X 'POST' \
+ "https://codeberg.org/api/v1/repos/penny64/hellclient/releases/$release_id/assets?name=hell_9" \
+ -H 'accept: application/json' \
+ -H "Authorization: token $key" \
+ -H 'Content-Type: multipart/form-data' \
+ -F 'attachment=@./plan9/hell'
+
+echo "Upload Mac"
+curl -X 'POST' \
+ "https://codeberg.org/api/v1/repos/penny64/hellclient/releases/$release_id/assets?name=hell_darwin" \
+ -H 'accept: application/json' \
+ -H "Authorization: token $key" \
+ -H 'Content-Type: multipart/form-data' \
+ -F 'attachment=@./mac/hell'
+
+echo "Upload Windows"
+curl -X 'POST' \
+ "https://codeberg.org/api/v1/repos/penny64/hellclient/releases/$release_id/assets?name=hell_win.exe" \
+ -H 'accept: application/json' \
+ -H "Authorization: token $key" \
+ -H 'Content-Type: multipart/form-data' \
+ -F 'attachment=@./win/hell.exe'
+
+echo "Upload Linux"
+curl -X 'POST' \
+ "https://codeberg.org/api/v1/repos/penny64/hellclient/releases/$release_id/assets?name=hell_linux" \
+ -H 'accept: application/json' \
+ -H "Authorization: token $key" \
+ -H 'Content-Type: multipart/form-data' \
+ -F 'attachment=@./linux/hell'
--
⑨