Feature/new release flow (#413)

* Test automatic deploy to play store.

* New release flow with Google Play Beta Support
This commit is contained in:
Justin Bassett 2020-02-13 11:35:51 -05:00 committed by GitHub
parent e82a6cc9e3
commit 6657a5c3b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 7 deletions

10
.travis/script.sh Normal file → Executable file
View File

@ -2,9 +2,11 @@
set -ev
echo `git log --format=%B -n 1 $TRAVIS_COMMIT` > CHANGES.md
git log --format=%B -n 1 $TRAVIS_COMMIT > CHANGES.md
mkdir -p app/src/main/play/release-notes/en-US/
cp CHANGES.md app/src/main/play/release-notes/en-US/default.txt
export VERSION_CODE=`git rev-list --count HEAD`
export VERSION_NAME=`git describe --tags $(git rev-list --tags --max-count=1)`
./gradlew test
./gradlew lint
@ -14,9 +16,9 @@ if [ "$TRAVIS_PULL_REQUEST" = "false" ]
then
if [ -n "$TRAVIS_TAG" ]
then
./gradlew publishReleaseBundle
echo "Release already in Play Store Console"
elif [ "$TRAVIS_BRANCH" = "master" ]
then
./gradlew assembleRelease appDistributionUploadRelease
./gradlew assembleRelease appDistributionUploadRelease publishReleaseBundle
fi
fi

View File

@ -30,7 +30,7 @@ If you get stuck while setting up your own environment, you can ask questions in
## Testing Dev Releases
We are using [Travis](https://travis-ci.com/home-assistant/home-assistant-android) to perform continuous integration both by unit testing, deploying dev releases to [Firebase App Distribution](https://appdistribution.firebase.dev/i/8zf5W4zz) and final releases to the [Play Store](https://play.google.com/store/apps/details?id=io.homeassistant.companion.android) when we add a git tag.
We are using [Travis](https://travis-ci.com/home-assistant/home-assistant-android) to perform continuous integration both by unit testing, deploying dev releases to [Play Store Beta](https://play.google.com/apps/testing/io.homeassistant.companion.android) and final releases to the [Play Store](https://play.google.com/store/apps/details?id=io.homeassistant.companion.android) when we release.
## Quality
@ -48,3 +48,14 @@ To run a check with an auto-format:
## Translating
The project currently uses [lokalise](https://lokalise.com/public/145814835dd655bc5ab0d0.36753359/) to translate the application. If you are interested in helping translate go the the link and click start translating!
## Generating a release to production
Edit the build number in `/app/build.gradle` to your desired version. Be sure to leave `${vCode}`!!
```kotlin
def vName = "X.X.X-${vCode}"
```
Merge that into master and allow the build to complete and validate on the beta channel. (Deploy there automatic)
Once ready to move to production log into play store -> Release Management -> App Releases -> Beta -> Promote to Production

View File

@ -19,6 +19,9 @@ buildscript {
}
}
def vCode = "${System.env.VERSION_CODE ?: 1}".toInteger()
def vName = "1.7.1-${vCode}"
android {
compileSdkVersion projectSdkVersion.toInteger()
@ -26,8 +29,8 @@ android {
applicationId "io.homeassistant.companion.android"
minSdkVersion projectMinSdkVersion
targetSdkVersion 29
versionCode "${System.env.VERSION_CODE ?: 1}".toInteger()
versionName "${System.env.VERSION_NAME ?: "1.0.0"}"
versionCode vCode
versionName vName
}
firebaseAppDistribution {
@ -77,6 +80,7 @@ android {
play {
serviceAccountCredentials = file("playStorePublishServiceCredentialsFile.json")
track = "beta"
}
dependencies {