aboutsummaryrefslogtreecommitdiff
path: root/generate-apk-release.sh
diff options
context:
space:
mode:
Diffstat (limited to 'generate-apk-release.sh')
-rwxr-xr-xgenerate-apk-release.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/generate-apk-release.sh b/generate-apk-release.sh
index c9b44358..a1438a6c 100755
--- a/generate-apk-release.sh
+++ b/generate-apk-release.sh
@@ -44,7 +44,7 @@ git push -fq origin master > /dev/null
echo "Create New Release"
API_JSON="$(printf '{"tag_name": "v%s","target_commitish": "master","name": "v%s","body": "Automatic Release v%s for branch %s %s","draft": false,"prerelease": false}' ${TRAVIS_BUILD_NUMBER} ${TRAVIS_BUILD_NUMBER} ${TRAVIS_BUILD_NUMBER} "\`${TRAVIS_BRANCH}\`" "\nhttps://github.com/${TRAVIS_REPO_SLUG}/commit/${TRAVIS_COMMIT}")"
-newRelease="$(curl --data "${API_JSON}" https://api.github.com/repos/${RELEASE_REPO}/releases?access_token=${GITHUB_API_KEY})"
+newRelease="$(curl --data "${API_JSON}" -H "Authorization: token ${GITHUB_API_KEY}" https://api.github.com/repos/${RELEASE_REPO}/releases)"
rID="$(echo "$newRelease" | jq ".id")"
cd ${HOME}/${VERSION_KEY}
@@ -52,7 +52,7 @@ echo "Push apk to $rID"
for apk in $(find *.apk -type f); do
apkName="${apk::-4}"
printf "Apk $apkName\n"
- curl "https://uploads.github.com/repos/${RELEASE_REPO}/releases/${rID}/assets?access_token=${GITHUB_API_KEY}&name=${apkName}-v${TRAVIS_BUILD_NUMBER}.apk" --header 'Content-Type: application/zip' --upload-file ${apkName}.apk -X POST
+ curl -H "Authorization: token ${GITHUB_API_KEY}" "https://uploads.github.com/repos/${RELEASE_REPO}/releases/${rID}/assets?name=${apkName}-v${TRAVIS_BUILD_NUMBER}.apk" --header 'Content-Type: application/zip' --upload-file ${apkName}.apk -X POST
done
echo -e "Done\n" \ No newline at end of file