oops, I forgot to add the release

This commit is contained in:
2025-10-05 17:59:01 +02:00
parent 1f0d3608f4
commit 7fabd92d2d

View File

@@ -20,7 +20,7 @@ TOKEN="$GITEA_API_KEY"
GITEA="https://git.site.quack-lab.dev"
REPO="dave/libre-hardware-monitor-exporter"
ZIP="libre-hardware-monitor-exporter-${TAG}.zip"
APK="libre-hardware-monitor-exporter-${TAG}.apk"
# Create a release
RELEASE_RESPONSE=$(curl -s -X POST \
-H "Authorization: token $TOKEN" \
@@ -40,17 +40,10 @@ RELEASE_ID=$(echo $RELEASE_RESPONSE | awk -F'"id":' '{print $2+0; exit}')
echo "Release ID: $RELEASE_ID"
echo "Uploading the things..."
WINRELEASE="./build/windows/x64/runner/Release/"
WINRELEASE="bin/Release/net8.0"
7z a $WINRELEASE/$ZIP $WINRELEASE/*
curl -X POST \
-H "Authorization: token $TOKEN" \
-F "attachment=@$WINRELEASE/$ZIP" \
"$GITEA/api/v1/repos/$REPO/releases/${RELEASE_ID}/assets?name=$ZIP"
rm $WINRELEASE/$ZIP
ANDROIDRELEASE="./build/app/outputs/flutter-apk/"
mv $ANDROIDRELEASE/app-release.apk $ANDROIDRELEASE/$APK
curl -X POST \
-H "Authorization: token $TOKEN" \
-F "attachment=@$ANDROIDRELEASE/$APK" \
"$GITEA/api/v1/repos/$REPO/releases/${RELEASE_ID}/assets?name=$APK"