-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (55 loc) · 1.91 KB
/
release-android.yml
File metadata and controls
57 lines (55 loc) · 1.91 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
name: Release Android
on:
push:
tags: [ 'v*' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.17.1
uses: actions/setup-node@v2
with:
node-version: 14.17.1
cache: 'npm'
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.2
bundler-cache: true
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- run: echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 -d > android.keystore
- run: echo '${{ secrets.PLAYSTORE_ACCESS_TOKEN }}' > /tmp/playstore_key.json
- run: echo '${{ secrets.SENTRY_TOKEN }}' > ./sentry.properties
- run: echo '${{ secrets.FCM_ANDROID_JSON }}' > ./google-services.json
- run: npm ci
# create www folder to satisfy cordova
- run: mkdir -p www
- run: npm run ionic -- cordova resources android
- run: npm run apply-version
- run: npm run replace-keystore-passwd
env:
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
- run: npm run cordova -- platform add android
- run: npm run ionic -- cordova build android --release --prod
- run: npm run ionic -- cordova build android --release --prod -- -- --packageType=apk
- run: bundle exec fastlane android beta
- name: Archive Artifacts
uses: actions/upload-artifact@v2
with:
name: "Android Release APK"
path: platforms/android/app/build/outputs/apk/release/app-release.apk
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
with:
environment: production
version: ${{ github.ref_name }}
sourcemaps: './www'