- Create an OAuth token from your profile settings
- under
Developer
selectPersonal access token
- generate a new one and copy it to the clipboard
- On the travis page of the repository, go to settings -->
More Options
->Settings
- Set a new Environment Variable called eg
GITHUB_RELEASE_API_KEY
or whatever u like, and copy the key - In the .travis.yaml file, under add something like that
before_deploy:
- ARCHIVE_BASE_PATH=${INSTALL_DIR}
- TARGET_VERSION=$(echo ${TRAVIS_TAG} | cut -d "v" -f2)
- TARGET_FULL_NAME=${TARGET_NAME}-${TARGET_VERSION}-${CC}-${TRAVIS_OS_NAME}
- INSTALL_ARCHIVE_FILENAME=${TARGET_FULL_NAME}.tgz
- cd ${INSTALL_DIR}
- tar -czvf ${INSTALL_ARCHIVE_FILENAME} ${TARGET_NAME}
deploy:
provider: releases
api_key:
secure: ${GITHUB_RELEASE_API_KEY}
file: ${ARCHIVE_BASE_PATH}/${INSTALL_ARCHIVE_FILENAME}
skip_cleanup: true
on:
tags: true