-
Notifications
You must be signed in to change notification settings - Fork 17
85 lines (85 loc) · 3.45 KB
/
codeql.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
name: RIA DigiDoc Android
on: [push, pull_request]
env:
BUILD_NUMBER: ${{ github.run_number }}
jobs:
ubuntu:
name: Build on Ubuntu
runs-on: ubuntu-latest
env:
APK_RELEASE_DIRECTORY: "app/build/outputs/apk/release"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup environment
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: |
echo "APP_VERSION_NAME=$(grep 'appVersionName=' gradle.properties | cut -d'=' -f 2 | cut -d'-' -f 1)" >> $GITHUB_ENV
cd ${{ github.workspace }}/app
echo -n "$GOOGLE_SERVICES_JSON" | base64 --decode > "google-services.json"
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
- name: Download Libdigidocpp Android (androidarm) artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
branch: master
name: androidarm
path: libdigidocpp-androidarm
repo: open-eid/libdigidocpp
- name: Download Libdigidocpp Android (androidarm64) artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
branch: master
name: androidarm64
path: libdigidocpp-androidarm64
repo: open-eid/libdigidocpp
- name: Download Libdigidocpp Android (androidx86_64) artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
branch: master
name: androidx86_64
path: libdigidocpp-androidx86_64
repo: open-eid/libdigidocpp
- name: Extract libdigidocpp artifacts
run: |
mkdir libdigidocpp-files/
mv libdigidocpp-androidarm/libdigidocpp.androidarm.zip libdigidocpp-files/
mv libdigidocpp-androidarm64/libdigidocpp.androidarm64.zip libdigidocpp-files/
mv libdigidocpp-androidx86_64/libdigidocpp.androidx86_64.zip libdigidocpp-files/
pwd
ls -R -laht
- name: Update libdigidocpp in project
run: |
pwd
./gradlew common-lib:updateLibdigidocpp --dir=libdigidocpp-files/
- name: Setup Gradle, Test and Build
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: clean test --no-daemon fetchAndPackageDefaultConfiguration -PappVersionName=${{ env.APP_VERSION_NAME }}.${{ env.BUILD_NUMBER }} assembleRelease --info
- name: Sign app APK
uses: r0adkll/sign-android-release@v1
id: signed_apk
with:
releaseDirectory: ${{ env.APK_RELEASE_DIRECTORY }}
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
- name: Rename APK
run: |
mv ${{ github.workspace }}/${{ env.APK_RELEASE_DIRECTORY }}/app-release-unsigned-signed.apk ${{ github.workspace }}/${{ env.APK_RELEASE_DIRECTORY }}/"RIA_DigiDoc_${{ env.APP_VERSION_NAME }}.${{ env.BUILD_NUMBER }}.apk"
- name: Upload APK
uses: actions/upload-artifact@v2
if: success()
with:
name: "RIA_DigiDoc_${{ env.APP_VERSION_NAME }}.${{ env.BUILD_NUMBER }}"
path: ${{ github.workspace }}/${{ env.APK_RELEASE_DIRECTORY }}/RIA_DigiDoc_${{ env.APP_VERSION_NAME }}.${{ env.BUILD_NUMBER }}.apk