-
Notifications
You must be signed in to change notification settings - Fork 16
60 lines (56 loc) · 1.99 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
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: set up JDK 16
uses: actions/setup-java@v3
with:
java-version: 16
distribution: 'adopt'
- name: List files in the repository
run: |
ls -R ${{ github.workspace }}
- name: Setup Keystore
run: |
echo "${{ secrets.SIGNING_KEY }}" > release.b64
base64 -d release.b64 > release.keystore
- name: mobsfscan
uses: MobSF/[email protected]
with:
args: '. --sarif --output results.sarif || true'
- name: Upload mobsfscan report
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
- name: Build with Gradle
run: |
./gradlew clean assembleRelease \
-PKEYSTORE=../release.keystore \
-PKEYSTORE_PASSWORD=${{ secrets.KEY_STORE_PASSWORD }} \
-PKEY_ALIAS=${{ secrets.ALIAS }} \
-PKEY_PASSWORD=${{ secrets.KEY_PASSWORD }} \
-PRELEASE_MAPS_MAPCACHE_API_KEY=${{ secrets.RELEASE_MAPS_MAPCACHE_API_KEY }}
# - name: Sign APK
# uses: noriban/sign-android-release@v4
# with:
# releaseDirectory: mapcache/build/outputs/apk/release
# signingKeyBase64: ${{ secrets.SIGNING_KEY }}
# alias: ${{ secrets.ALIAS }}
# keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
# keyPassword: ${{ secrets.KEY_PASSWORD }}
# - name: Copy Release Artifacts
# run: |
# mkdir mapcache/build/release
# cp mapcache/build/outputs/apk/release/mapcache-*-signed.apk "mapcache/build/release/mapcache-$(./gradlew mapcache:androidAppVersion | grep versionName | sed 's/^.*@//').apk"
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: mapcache
path: mapcache/build/outputs/apk/release/mapcache-release.apk