Skip to content

Commit

Permalink
Create github_pr_workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
michgauz authored Apr 20, 2021
1 parent 4baf874 commit 6936c64
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/github_pr_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Android CI

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Checkout submodule
run: git submodule sync --recursive && git submodule update --init --recursive

- name: Before build
uses: xdtianyu/actions-android-ci@master
env:
ENCRYPTED_KEY: ${{ secrets.ENCRYPTED_KEY }}
ENCRYPTED_IV: ${{ secrets.ENCRYPTED_IV }}
with:
args: '"
. ./env.sh;
openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in secrets.tar.enc -out secrets.tar -d;
tar xvf secrets.tar;
touch local.properties
"'

- name: Cache gradle and sdk
uses: actions/cache@v2
env:
cache-name: cache-gradle-and-sdk
with:
path: |
${{ github.workspace }}/.opt/cache/gradle/wrapper
${{ github.workspace }}/.opt/cache/gradle/caches
${{ github.workspace }}/.opt/sdk
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/wrapper/gradle-wrapper.properties', '**/build.gradle') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Build
uses: xdtianyu/actions-android-ci@master
with:
args: '"
umask 000;
. ./env.sh;
. /opt/setup-android-sdk.sh;
./gradlew assembleDebug
"'

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: |
app/**/apk/debug/*

0 comments on commit 6936c64

Please sign in to comment.