forked from felHR85/UsbSerial
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate Releases Using Travis CI and Github Releases
Add Travis CI config with github release support. This should upload artifacts to GitHub release after a tag is pushed to the repo. A way to automate the release. It also makes builds on every branch that gets a commit push. Add information on how to make a release for the project. This is a separate markdown file detailing the procedure.
- Loading branch information
Showing
6 changed files
with
53 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
language: android | ||
android: | ||
components: | ||
- tools | ||
- platform-tools | ||
# Note that the tools section appears twice on purpose as it’s required to get the newest Android SDK tools. | ||
# See: https://docs.travis-ci.com/user/languages/android/#Overview | ||
- tools | ||
- build-tools-27.0.2 | ||
- build-tools-26.0.2 | ||
- android-27 | ||
- android-26 | ||
before_cache: | ||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | ||
cache: | ||
directories: | ||
- $HOME/.gradle/caches/ | ||
- $HOME/.gradle/wrapper/ | ||
before_script: | ||
- export VERSION_TO_BUILD="$TRAVIS_TAG" | ||
script: ./gradlew clean build | ||
deploy: | ||
provider: releases | ||
api_key: $GITHUB_OAUTH_TOKEN | ||
file: usbserial/build/outputs/aar/usbserial-${VERSION_TO_BUILD}-release.aar | ||
skip_cleanup: true | ||
on: | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Releasing | ||
======== | ||
|
||
1. Change the `VERSION_NAME` value in `gradle.properties` to the version number to be released. | ||
2. Update the `README.md` with the new version. | ||
3. `./gradlew clean build` | ||
4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version) | ||
5. `git tag -a X.Y.Z -m "Version X.Y.Z"` -m "Changelog message 1" - m "Changelog message 2" -m "Changelog message 3" | ||
6. `git push && git push --tags` | ||
|
||
*Note:* To get the changelog messages from the commit history, issue | ||
|
||
```shell | ||
git log "$(git tag | tail -n2 | head -n1)..$(git tag | tail -n1)" --oneline --invert-grep --grep="Merge pull request" --grep="Prepare for release" | cut -d' ' -f2- | sed -E -e 's/^/-m "/' | sed -E -e 's/$/"/' | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.