diff --git a/publish.sh b/publish.sh index aeb90e9..9d439bc 100755 --- a/publish.sh +++ b/publish.sh @@ -76,15 +76,24 @@ if [ -z "$RELEASE_ID" ]; then exit 1 fi -# Upload binaries -for BIN in bb64.amd64 bb64.arm64; do - if [ -f "output/$BIN" ]; then - curl -s -X POST "$API_URL/releases/$RELEASE_ID/assets?name=$BIN" \ - -H "Content-Type: application/octet-stream" \ - -H "Authorization: token $TOKEN" \ - --data-binary @"output/$BIN" - echo "Uploaded $BIN to release $TAG." +# Upload binaries and install.sh +for FILE in bb64.amd64 bb64.arm64 install.sh; do + if [ -f "output/$FILE" ]; then + filetoupload="output/$FILE" + elif [ -f "$FILE" ]; then + filetoupload="$FILE" + else + continue fi + + # Auto-detect content type + ctype=$(file --mime-type -b "$filetoupload") + + curl -s -X POST "$API_URL/releases/$RELEASE_ID/assets?name=$FILE" \ + -H "Content-Type: $ctype" \ + -H "Authorization: token $TOKEN" \ + --data-binary @"$filetoupload" + echo "Uploaded $FILE to release $TAG as $ctype." done echo "Published bb64 version $v to $REPO_URL (tag $TAG) with binaries." diff --git a/version.h b/version.h index a2d3a9e..54a21f7 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -static const char *VERSION = "25"; +static const char *VERSION = "26";