-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
69 additions
and
1 deletion.
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,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 |
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 |
---|---|---|
|
@@ -2,3 +2,5 @@ gplay-keys.json | |
kau.keystore | ||
kau.properties | ||
update-dev.sh | ||
kau.tar | ||
kau_github.tar |
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,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 |
Binary file not shown.
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