Skip to content

Commit

Permalink
Release 5.0.4 (125, GitHub Actions)
Browse files Browse the repository at this point in the history
  • Loading branch information
devgianlu committed Jan 9, 2021
1 parent 8442507 commit 6fd37be
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 75 deletions.
4 changes: 4 additions & 0 deletions .github/decrypt_secrets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

gpg --quiet --batch --yes --decrypt --passphrase="$SECRETS_GPG_PASS" --output .github/secrets.tar .github/secrets.tar.gpg
tar xvf .github/secrets.tar -C .github
Binary file added .github/secrets.tar.gpg
Binary file not shown.
49 changes: 49 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Android CI

on:
push:
branches: [ master ]
tags:
- 'v*'
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission to scripts
run: chmod +x gradlew .github/decrypt_secrets.sh
- name: Decrypt GPG secrets
run: .github/decrypt_secrets.sh
env:
SECRETS_GPG_PASS: ${{ secrets.SECRETS_GPG_PASS }}
- name: Build with Gradle
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: ./gradlew connectedCheck --no-daemon
- name: Publish with Gradle
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: ./gradlew assembleRelease publish --no-daemon
env:
KEYSTORE_STORE_PASS: ${{ secrets.KEYSTORE_STORE_PASS }}
KEYSTORE_KEY_ALIAS: gianlu
KEYSTORE_KEY_PASS: ${{ secrets.KEYSTORE_KEY_PASS }}
- name: Create release
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: app/src/main/play/release-notes/en-GB/production.txt
draft: true
prerelease: false
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
/app/build
/app/**/release/
local.properties
google-services.json
!/app/src/foss/google-services.json
*.iml
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .travis/build.sh

This file was deleted.

16 changes: 0 additions & 16 deletions .travis/github-release.sh

This file was deleted.

Binary file removed .travis/secrets.tar.enc
Binary file not shown.
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.crashlytics'

def isTravis = System.getenv("CI") == "true"
def isCi = System.getenv("CI") == "true"
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
Expand All @@ -18,13 +18,13 @@ android {
versionName "5.0.4"
}

if (isTravis) {
if (isCi) {
signingConfigs {
release {
storeFile file("../.travis/keystore.jks")
storePassword System.getenv("keystore_storePsswd")
keyAlias = System.getenv("keystore_keyAlias")
keyPassword System.getenv("keystore_keyPsswd")
storeFile file("../.github/keystore.jks")
storePassword System.getenv("KEYSTORE_STORE_PASS")
keyAlias = System.getenv("KEYSTORE_KEY_ALIAS")
keyPassword System.getenv("KEYSTORE_KEY_PASS")
}
}
}
Expand All @@ -34,7 +34,7 @@ android {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (isTravis) signingConfig signingConfigs.release
if (isCi) signingConfig signingConfigs.release
}
}

Expand Down Expand Up @@ -75,8 +75,8 @@ android {

play {
defaultToAppBundles.set(true)
enabled.set(isTravis)
serviceAccountCredentials.set(file("../.travis/secrets.json"))
enabled.set(isCi)
serviceAccountCredentials.set(file("../.github/secrets.json"))
track.set("production")
releaseStatus.set(com.github.triplet.gradle.androidpublisher.ReleaseStatus.DRAFT)
}
Expand Down
40 changes: 40 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"project_info": {
"project_number": "596428580538",
"firebase_url": "https://pretend-youre-xyzzy-android.firebaseio.com",
"project_id": "pretend-youre-xyzzy-android",
"storage_bucket": "pretend-youre-xyzzy-android.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:596428580538:android:5e4b3634c166b3102a0483",
"android_client_info": {
"package_name": "com.gianlu.pretendyourexyzzy"
}
},
"oauth_client": [
{
"client_id": "596428580538-idv220mduj2clinjoq11sd0n60dgbjr4.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCkK6AXjBNjVHA7Pwqe_SixdSpfwJklWNE"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "596428580538-idv220mduj2clinjoq11sd0n60dgbjr4.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

0 comments on commit 6fd37be

Please sign in to comment.