-
Notifications
You must be signed in to change notification settings - Fork 11
98 lines (79 loc) · 3.77 KB
/
dashwallet.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
95
96
97
name: Dash Wallet CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master, feature-*, bugfix-* ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get build number from run id
run: |
echo "build_number=$((70000))" >> $GITHUB_ENV
- name: Get the support email
env:
SUPPORT_EMAIL: "${{ secrets.INTERNAL_SUPPORT_EMAIL }}"
run: |
echo "SUPPORT_EMAIL=$SUPPORT_EMAIL" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.3'
- name: Generate cache key
run: bash ./checksum.sh checksum.txt
- name: Gem caching
uses: actions/cache@v2
continue-on-error: true
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Setup fastlane
run: |
gem install bundler:2.2.26
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Cache Gradle packages
uses: actions/cache@v2
continue-on-error: true
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: ${{ runner.os }}-gradle-${{ hashFiles('checksum.txt') }}
- name: Decrypt secrets
run: |
gpg -d --passphrase "${{ secrets.GOOGLE_SERVICES_KEY }}" --batch .deploy/google-services.json.gpg > wallet/google-services.json
gpg -d --passphrase "${{ secrets.SERVICE_PROPERTIES_KEY }}" --batch .deploy/service.properties.gpg > service.properties
gpg -d --passphrase "${{ secrets.APP_DISTRIBUTION_KEY }}" --batch .deploy/app-distribution-key.json.gpg > .deploy/app-distribution-key.json
gpg -d --passphrase "${{ secrets.KEYSTORE_KEY }}" --batch .deploy/keystore.jks.gpg > .deploy/keystore.jks
gpg -d --passphrase "${{ secrets.LOCAL_PROPERTIES_KEY }}" --batch .deploy/local.properties.gpg > local.properties
gpg -d --passphrase "${{ secrets.GC_STORAGE_SERVICE_ACCOUNT_KEY }}" --batch .deploy/gc-storage-service-account.json.gpg > .deploy/gc-storage-service-account.json
- name: Copy explore.db from GC Storage
run: |
gem install google-cloud-storage
rm -rf wallet/assets/explore/*
ruby -r ./exploredata.rb
- name: Test
run: bundle exec fastlane test flavor:"" type:"debug"
- name: Build
if: github.event_name == 'pull_request'
run: bundle exec fastlane build flavor:"_testNet3" type:"release" store_pass:"${{ secrets.SIGNING_STORE_PASS }}" version_code:"${{ env.build_number }}"
- name: TestNet Build and Firebase Distribution
if: github.event_name == 'push'
run: bundle exec fastlane build_distribute flavor:"_testNet3" type:"release" store_pass:"${{ secrets.SIGNING_STORE_PASS }}" version_code:"${{ env.build_number }}" comment:"Up to date Dash Wallet TestNet build" app_id:"1:1039839682638:android:3202b16d460a1a88" test_group:"qa" SUPPORT_EMAIL:"${{ secrets.INTERNAL_SUPPORT_EMAIL }}"
- name: Production Build and Firebase Distribution
if: github.event_name == 'push'
run: bundle exec fastlane build_distribute flavor:"prod" type:"release" store_pass:"${{ secrets.SIGNING_STORE_PASS }}" version_code:"${{ env.build_number }}" comment:"Up to date Dash Wallet Production build" app_id:"1:1039839682638:android:989eecd6db36de6a" test_group:"qa" SUPPORT_EMAIL:"${{ secrets.INTERNAL_SUPPORT_EMAIL }}"