-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (61 loc) · 2.14 KB
/
Copy pathsetup.yml
File metadata and controls
69 lines (61 loc) · 2.14 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Shared Setup Workflow
on:
workflow_call:
secrets:
TMDB_API_KEY:
required: true
SIGNING_KEY_ALIAS:
required: true
SIGNING_KEY_PASSWORD:
required: true
SIGNING_STORE_PASSWORD:
required: true
GOOGLE_SERVICES_JSON:
required: true
SIGNING_KEYSTORE:
required: true
jobs:
setup:
runs-on: ubuntu-latest
outputs:
project-setup-key: project-setup-${{ github.sha }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Cache Gradle dependencies
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-cache-${{ hashFiles('**/gradle-wrapper.properties', '**/*.gradle*', '**/settings.gradle*', '**/libs.versions.toml') }}
restore-keys: |
gradle-cache-${{ runner.os }}-
gradle-cache-
- name: Create local.properties from secrets
run: |
echo "sdk.dir=$ANDROID_SDK_ROOT" > local.properties
echo "API_KEY=\"${{ secrets.TMDB_API_KEY }}\"" >> local.properties
echo "keyAlias=${{ secrets.SIGNING_KEY_ALIAS }}" >> local.properties
echo "keyPassword=${{ secrets.SIGNING_KEY_PASSWORD }}" >> local.properties
echo "storePassword=${{ secrets.SIGNING_STORE_PASSWORD }}" >> local.properties
echo "storeFile=novix-release.jks" >> local.properties
- name: Decode Firebase Config from secrets
run: echo "${{ secrets.GOOGLE_SERVICES_JSON }}" | base64 --decode > app/google-services.json
- name: Decode Keystore from secrets
run: echo "${{ secrets.SIGNING_KEYSTORE }}" | base64 --decode > app/novix-release.jks
- name: Cache project setup files
uses: actions/cache@v4
with:
path: |
local.properties
app/google-services.json
app/novix-release.jks
key: project-setup-${{ github.sha }}