forked from flyinghead/flycast
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.56 KB
/
android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Android CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up build environment
run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;20.0.5594570"
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Gradle
working-directory: shell/android-studio
run: ./gradlew assembleDebug --parallel
- uses: actions/upload-artifact@v2
with:
name: flycast-debug.apk
path: shell/android-studio/flycast/build/outputs/apk/debug/flycast-debug.apk
- name: Set up git vars
run: |
echo GIT_BUILD=`git describe --all --always | sed 's/remotes\/origin/heads/'`-$GITHUB_SHA >> $GITHUB_ENV
- name: Clean up
run: rm -f shell/android-studio/flycast/build/outputs/apk/debug/*.json
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: flycast-builds
AWS_ACCESS_KEY_ID: AKIAJOZQS4H2PHQWYFCA
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }}
AWS_REGION: 'us-east-2'
SOURCE_DIR: 'shell/android-studio/flycast/build/outputs/apk/debug/'
DEST_DIR: android/${{ env.GIT_BUILD }}
if: ${{ github.event_name == 'push' }}