generated from SmashKs/JurassicPark
-
Notifications
You must be signed in to change notification settings - Fork 3
94 lines (83 loc) · 4.11 KB
/
build.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Build Workflow
on: [push]
jobs:
build:
name: Build Workflow
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Clone Repo
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17
- name: Setup keystore
env:
SIGNING_KEY: ${{ secrets.RELEASE_KEYSTORE }}
run: echo $SIGNING_KEY | base64 -di > taiwanno1_release.keystore
- name: Decode firebase configuration file
env:
FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}
run: echo $FIREBASE_CONFIG > app/google-services.json
- name: Decode other configuration files
env:
FACEBOOK_KEYS: ${{ secrets.FACEBOOK_KEYS }}
LASTFM_KEYS: ${{ secrets.LASTFM_KEYS }}
SSL_CERTFICATION: ${{ secrets.SSL_CERTFICATION }}
run: |
echo $FACEBOOK_KEYS > app/src/main/res/values/facebook_key.xml
echo $LASTFM_KEYS > features/explore/src/main/res/values/keys.xml
echo $SSL_CERTFICATION > libraries/core/src/main/res/raw/mycertfile.crt
- name: Creating local properties file
env:
SEEK_SONG_URI_REQUEST: ${{ secrets.SEEK_SONG_URI_REQUEST }}
SEEK_SONG_URI_DOMAIN: ${{ secrets.SEEK_SONG_URI_DOMAIN }}
SEEK_SONG_QUERY_2: ${{ secrets.SEEK_SONG_QUERY_2 }}
SEEK_SONG_QUERY_1: ${{ secrets.SEEK_SONG_QUERY_1 }}
SEEK_SONG_PARAM_2: ${{ secrets.SEEK_SONG_PARAM_2 }}
SEEK_SONG_PARAM_1: ${{ secrets.SEEK_SONG_PARAM_1 }}
LYRIC_URI_DOMAIN: ${{ secrets.LYRIC_URI_DOMAIN }}
SONG_URI_DOMAIN: ${{ secrets.SONG_URI_DOMAIN }}
SONG_URI_REQUEST: ${{ secrets.SONG_URI_REQUEST }}
LYRIC_URI_REQUEST: ${{ secrets.LYRIC_URI_REQUEST }}
RANKING_URI_REQUEST: ${{ secrets.RANKING_URI_REQUEST }}
RANKING_URI_DOMAIN: ${{ secrets.RANKING_URI_DOMAIN }}
KEYSTORE_PASSWORD: ${{ secrets.RANKING_URI_DOMAIN }}
KEY_ALIAS: ${{ secrets.RANKING_URI_DOMAIN }}
KEY_PASSWORD: ${{ secrets.RANKING_URI_DOMAIN }}
run: |
echo -e "seek_song_uri_request=\"$SEEK_SONG_URI_REQUEST\"" >> local.properties
echo -e "\nseek_song_uri_domain=\"$SEEK_SONG_URI_DOMAIN\"" >> local.properties
echo -e "\nseek_song_query_2=\"$SEEK_SONG_QUERY_2\"" >> local.properties
echo -e "\nseek_song_query_1=\"$SEEK_SONG_QUERY_1\"" >> local.properties
echo -e "\nseek_song_param_2=\"$SEEK_SONG_PARAM_2\"" >> local.properties
echo -e "\nseek_song_param_1=\"$SEEK_SONG_PARAM_1\"" >> local.properties
echo -e "\nlyric_uri_domain=\"$LYRIC_URI_DOMAIN\"" >> local.properties
echo -e "\nsong_uri_domain=\"$SONG_URI_DOMAIN\"" >> local.properties
echo -e "\nsong_uri_request=\"$SONG_URI_REQUEST\"" >> local.properties
echo -e "\nlyric_uri_request=\"$LYRIC_URI_REQUEST\"" >> local.properties
echo -e "\nranking_uri_request=\"$RANKING_URI_REQUEST\"" >> local.properties
echo -e "\nranking_uri_domain=\"$RANKING_URI_DOMAIN\"" >> local.properties
echo -e "\nstore_password=$KEYSTORE_PASSWORD" >> local.properties
echo -e "\nkey_alias=$KEY_ALIAS" >> local.properties
echo -e "\nkey_password=$KEY_PASSWORD" >> local.properties
# - name: Run Unit Tests
# run: ./gradlew test
- name: Assemble Debug APK
run: ./gradlew assembleDebug
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
job_name: Build
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
MATRIX_CONTEXT: ${{ toJson(matrix) }}
if: always() # Pick up events even if the job fails or is canceled.