-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (38 loc) · 1.21 KB
/
android-ci.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
name: Android CI
# Triggers the workflow on push to the main branch or on pull requests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository code
- name: Checkout code
uses: actions/checkout@v2
# Step 2: Set up JDK 17 (required for Gradle)
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: '17'
# Step 3: Cache Gradle dependencies
- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# Step 4: Build the project using Gradle
- name: Build with Gradle
run: ./gradlew build
env:
SAMPLE_PROJECT_ID: ${{ secrets.SAMPLE_PROJECT_ID }}
SAMPLE_MAPPING_UPLOAD_CLIENT_ID: ${{ secrets.SAMPLE_MAPPING_UPLOAD_CLIENT_ID }}
SAMPLE_MAPPING_UPLOAD_CLIENT_SECRET: ${{ secrets.SAMPLE_MAPPING_UPLOAD_CLIENT_SECRET }}