diff --git a/upload-binaries.sh b/upload-binaries.sh index 858d1acfa..e01376b31 100755 --- a/upload-binaries.sh +++ b/upload-binaries.sh @@ -49,6 +49,11 @@ if [ "$TRAVIS_BRANCH" == "master" ]; then curl -X DELETE -H "Authorization: token ${GH_TOKEN}" \ "https://api.github.com/repos/WagicProject/wagic/releases/${ID_TO_DELETE}" + # delete previous tag + curl -X DELETE -H "Authorization: token ${GH_TOKEN}" \ + "https://api.github.com/repos/WagicProject/wagic/git/refs/tags/latest-master" + + echo -e "Creating a release\n" curl -X POST -H "Authorization: token ${GH_TOKEN}" \ -d '{"tag_name": "latest-master", "target_commitish": "master", "name": "master-'${TRAVIS_BUILD_NUMBER}'", "body": "Automatic release based on latest commit to master branch generated by Travis CI", "draft": false, "prerelease": true}' "https://api.github.com/repos/WagicProject/wagic/releases" > json.txt