Skip to content

Commit

Permalink
fix(release): Automate releases to Google Play Store (#46)
Browse files Browse the repository at this point in the history
* fix(release): Automate releases to Google Play Store

Blocked by Triple-T/gradle-play-publisher#933

Fixes #7

* import listing

* configure semantic release
  • Loading branch information
gnarea authored Apr 16, 2021
1 parent 072471e commit 9073806
Show file tree
Hide file tree
Showing 32 changed files with 52 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ jobs:
release:
name: "Deploy to Google Play Store"
needs: ci
# if: github.ref == 'refs/heads/master'
if: false
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down
12 changes: 12 additions & 0 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
branch: master
plugins:
- "@semantic-release/commit-analyzer"
- - "@semantic-release/release-notes-generator"
- linkCompare: false
linkReferences: false
- - "@semantic-release/npm"
- npmPublish: false
- - "@semantic-release/exec"
- prepareCmd: 'echo "${nextRelease.notes}" | head -c 500 > app/src/main/play/release-notes/en-GB/beta.txt'
publishCmd: "./.github/scripts/publish-to-play-store.sh ${nextRelease.version}"
- "@semantic-release/github"
25 changes: 23 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
import com.github.triplet.gradle.androidpublisher.ResolutionStrategy as GPPResolutionStrategy

buildscript {
repositories {
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.github.triplet.gradle:play-publisher:3.4.0'
}
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
apply plugin: 'com.github.triplet.play'

repositories {
maven { url "https://jitpack.io" }
Expand All @@ -17,8 +31,8 @@ android {
applicationId "tech.relaycorp.ping"
minSdkVersion 26
targetSdkVersion 30
versionCode 2
versionName "0.2"
versionCode 7
versionName project.findProperty("versionName") ?: "0.7"
testInstrumentationRunner "tech.relaycorp.ping.test.TestAndroidJUnitRunner"

kapt {
Expand Down Expand Up @@ -172,3 +186,10 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
'-Xuse-experimental=kotlin.time.ExperimentalTime'
]
}

play {
enabled.set(project.findProperty("enableGpp") == "true")
track.set("beta")
defaultToAppBundles.set(true)
resolutionStrategy.set(GPPResolutionStrategy.AUTO)
}
1 change: 1 addition & 0 deletions app/src/main/play/contact-email.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[email protected]
1 change: 1 addition & 0 deletions app/src/main/play/contact-website.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://awala.network
1 change: 1 addition & 0 deletions app/src/main/play/default-language.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
en-GB
1 change: 1 addition & 0 deletions app/src/main/play/listings/en-GB/full-description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a technical tool to end-to-end test Awala with and without access to the Internet.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/src/main/play/listings/en-GB/short-description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test Awala gateways and courier routes
1 change: 1 addition & 0 deletions app/src/main/play/listings/en-GB/title.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Awala Ping
Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:8.3.1"
}
Expand Down
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "relaynet-gateway-android",
"devDependencies": {
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/github": "^7.0.6",
"@semantic-release/release-notes-generator": "^9.0.1"
}
}

0 comments on commit 9073806

Please sign in to comment.