Skip to content

Commit

Permalink
Update upload.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
imbroglius authored Jul 4, 2024
1 parent d69f8c0 commit fed2c49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ BD=$HOME/builds
TAG="$(date +v%Y.%m.%d)"
GUSER="Imbroglius"
GREPO="Redmi_13C_treble_aosp"
AUTH="Authorization: token $github_api_token"


SKIPOTA=false
Expand All @@ -27,7 +28,7 @@ createRelease() {
res=$(curl -s -L -X POST \
"https://api.github.com/repos/$GUSER/$GREPO/releases" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer secrets.GITHUB_TOKEN" \
-H "Authorization: Bearer AUTH" \
-d "{\"tag_name\":\"$TAG\",\"name\":\"AOSP 14.0 $TAG\",\"body\":\"## Changelog\n- ...\n\n## Notes\n- ...\",\"draft\":true}")
id=$(echo "$res" | jq -rc ".id")
echo
Expand All @@ -40,7 +41,7 @@ uploadAssets() {
curl -o /dev/null -s -L -X POST \
"https://uploads.github.com/repos/$GUSER/$GREPO/releases/$id/assets?name=$(basename $file)" \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer secrets.GITHUB_TOKEN" \
-H "Authorization: Bearer AUTH" \
-H "Content-Type: application/octet-stream" \
-T "$file"
echo
Expand Down

0 comments on commit fed2c49

Please sign in to comment.