aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-09-11 20:07:17 -0700
committerGitHub <noreply@github.com>2021-09-11 20:07:17 -0700
commit639771b9758f1e36c34ed99994ba2c03a0a361ec (patch)
tree38318946b3ad5210e2c649b36678321d9fbb26d4
parent64065549f22364b01095c59aad204ed252c9cd63 (diff)
downloadkau-639771b9758f1e36c34ed99994ba2c03a0a361ec.tar.gz
kau-639771b9758f1e36c34ed99994ba2c03a0a361ec.tar.bz2
kau-639771b9758f1e36c34ed99994ba2c03a0a361ec.zip
Github Actions (#266)6.3.0
-rw-r--r--.github/workflows/android.yml54
-rw-r--r--README.md2
-rw-r--r--files/.gitignore2
-rw-r--r--files/github_actions.sh9
-rw-r--r--files/kau_github.tar.gpgbin0 -> 4223 bytes
-rw-r--r--sample/build.gradle3
6 files changed, 69 insertions, 1 deletions
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
new file mode 100644
index 0000000..25a2499
--- /dev/null
+++ b/.github/workflows/android.yml
@@ -0,0 +1,54 @@
+name: Android CI
+
+on:
+ push:
+ branches: [ '*' ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 100
+
+ - name: Fetch all tags
+ run: git fetch origin +refs/tags/*:refs/tags/*
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v2
+ with:
+ java-version: '11'
+ java-package: jdk
+ distribution: 'adopt'
+ cache: gradle
+
+ - name: Validate gradle wrapper
+ uses: gradle/wrapper-validation-action@v1
+
+ - name: Decrypt secret
+ if: ${{ false }}
+ run: |
+ gpg -d --passphrase "${{ secrets.KAU_TAR_SECRET }}" --batch "files/kau_github.tar.gpg" > "files/kau_github.tar"
+ tar xvf files/kau_github.tar -C files
+
+ - name: Checkout Gradle Build Cache
+ if: ${{ steps.self_hosted.outputs.FLAG != 'self-hosted' }}
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.gradle/caches
+ ~/.gradle/wrapper
+ !~/.gradle/wrapper/dists/**/gradle*.zip
+ key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
+ restore-keys: |
+ gradle-${{ runner.os }}-
+
+ - name: Grant execute permission for gradlew
+ run: chmod +x gradlew
+
+ - name: Check and Test
+ run: ./gradlew spotlessCheck lintRelease testReleaseUnitTest
diff --git a/README.md b/README.md
index 73ba2e4..cfb96a0 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ This library contains small helper functions used throughout almost all of my ot
KAU is available on JitPack
[![](https://jitpack.io/v/ca.allanwang/kau.svg)](https://jitpack.io/#ca.allanwang/kau)
-[![Build Status](https://travis-ci.com/AllanWang/KAU.svg?branch=dev)](https://travis-ci.com/AllanWang/KAU)
+[![Build Status](https://github.com/AllanWang/KAU/actions/workflows/android.yml/badge.svg?branch=dev)](https://github.com/AllanWang/KAU/actions/workflows/android.yml)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/kotlin-android-utils/localized.svg)](https://crowdin.com/project/kotlin-android-utils)
[![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin)
[![ZenHub](https://img.shields.io/badge/Shipping%20faster%20with-ZenHub-45529A.svg)](https://app.zenhub.com/workspace/o/allanwang/kau/boards)
diff --git a/files/.gitignore b/files/.gitignore
index e9bf9f6..8791cfa 100644
--- a/files/.gitignore
+++ b/files/.gitignore
@@ -2,3 +2,5 @@ gplay-keys.json
kau.keystore
kau.properties
update-dev.sh
+kau.tar
+kau_github.tar
diff --git a/files/github_actions.sh b/files/github_actions.sh
new file mode 100644
index 0000000..957d0fa
--- /dev/null
+++ b/files/github_actions.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+# Add appropriate files for encryption
+# https://docs.github.com/en/actions/reference/encrypted-secrets#limits-for-secrets
+
+rm kau_github.tar.gpg
+tar cvf kau_github.tar gplay-keys.json kau.keystore kau.properties
+gpg --symmetric --cipher-algo AES256 kau_github.tar
+rm kau_github.tar \ No newline at end of file
diff --git a/files/kau_github.tar.gpg b/files/kau_github.tar.gpg
new file mode 100644
index 0000000..15b4060
--- /dev/null
+++ b/files/kau_github.tar.gpg
Binary files differ
diff --git a/sample/build.gradle b/sample/build.gradle
index c35e512..90a8d10 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -51,6 +51,9 @@ android {
keyAlias releaseProps.getProperty('keyAlias')
keyPassword releaseProps.getProperty('keyPassword')
}
+ println("Added KAU release signing")
+ } else {
+ println("No KAU release signing found")
}
debug {