1010
1111env :
1212 KEYSTORE_FILE : keystore-qrbarcode.jks
13+ KEYSTORE_PASSWORD : ${{ secrets.KEYSTORE_PASSWORD }}
14+ KEY_ALIAS : ${{ secrets.KEY_ALIAS }}
15+ KEY_PASSWORD : ${{ secrets.KEY_PASSWORD }}
1316 GOOGLE_PLAY_JSON_PATH : app/qrbarcode-8b0b8-aaefa03b2374.json
1417
1518jobs :
1619 setup :
1720 name : Setup Environment
1821 runs-on : ubuntu-latest
19-
22+ container :
23+ image : softartdev/android-fastlane:33
2024 steps :
2125 - name : Checkout Repository
2226 uses : actions/checkout@v3
4246 path : vendor/bundle
4347 key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
4448
45- - name : Install Fastlane via Bundler
49+ - name : Install Dependencies
4650 run : |
4751 bundle config set path 'vendor/bundle'
4852 bundle install
5458 run : |
5559 echo "sdk.dir=$ANDROID_HOME" > local.properties
5660 echo "KEYSTORE_FILE=$KEYSTORE_FILE" >> local.properties
57- echo "KEYSTORE_PASSWORD=${{ secrets. KEYSTORE_PASSWORD }} " >> local.properties
58- echo "KEY_ALIAS=${{ secrets. KEY_ALIAS }} " >> local.properties
59- echo "KEY_PASSWORD=${{ secrets. KEY_PASSWORD }} " >> local.properties
61+ echo "KEYSTORE_PASSWORD=$KEYSTORE_PASSWORD" >> local.properties
62+ echo "KEY_ALIAS=$KEY_ALIAS" >> local.properties
63+ echo "KEY_PASSWORD=$KEY_PASSWORD" >> local.properties
6064
6165 - name : Create Google Service Account JSON
6266 run : |
@@ -67,14 +71,25 @@ jobs:
6771 name : Build AAB
6872 runs-on : ubuntu-latest
6973 needs : setup
70-
7174 steps :
7275 - uses : actions/checkout@v3
73- - name : Build with Fastlane
74- run : bundle exec fastlane buildBundle
75-
76- - name : Upload Bundle Artifact
77- uses : actions/upload-artifact@v4
76+ - uses : actions/setup-java@v3
77+ with :
78+ java-version : ' 17'
79+ distribution : ' temurin'
80+ - uses : ruby/setup-ruby@v1
81+ with :
82+ ruby-version : ' 3.1'
83+ bundler-cache : true
84+ - uses : actions/cache@v4
85+ with :
86+ path : vendor/bundle
87+ key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
88+ - run : |
89+ bundle config set path 'vendor/bundle'
90+ bundle install
91+ - run : bundle exec fastlane buildBundle
92+ - uses : actions/upload-artifact@v4
7893 with :
7994 name : release-aab
8095 path : app/build/outputs/bundle/release/*.aab
@@ -83,21 +98,32 @@ jobs:
8398 name : Unit Tests
8499 runs-on : ubuntu-latest
85100 needs : build
86-
87101 steps :
88102 - uses : actions/checkout@v3
89- - name : Run Tests
90- run : bundle exec fastlane test
103+ - uses : ruby/setup-ruby@v1
104+ with :
105+ ruby-version : ' 3.1'
106+ bundler-cache : true
107+ - uses : actions/cache@v4
108+ with :
109+ path : vendor/bundle
110+ key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
111+ - run : |
112+ bundle config set path 'vendor/bundle'
113+ bundle install
114+ - run : bundle exec fastlane test
91115
92116 code-analysis :
93117 name : Lint & Check
94118 runs-on : ubuntu-latest
95119 needs : build
96-
97120 steps :
98121 - uses : actions/checkout@v3
99- - name : Run Lint
100- run : ./gradlew clean check
122+ - uses : actions/setup-java@v3
123+ with :
124+ java-version : ' 17'
125+ distribution : ' temurin'
126+ - run : ./gradlew clean check
101127 - uses : actions/upload-artifact@v4
102128 with :
103129 name : lint-reports
@@ -111,30 +137,57 @@ jobs:
111137 runs-on : ubuntu-latest
112138 if : github.ref == 'refs/heads/master'
113139 needs : build
114-
115140 steps :
116141 - uses : actions/checkout@v3
117- - name : Deploy Release
118- run : bundle exec fastlane deployRelease
142+ - uses : ruby/setup-ruby@v1
143+ with :
144+ ruby-version : ' 3.1'
145+ bundler-cache : true
146+ - uses : actions/cache@v4
147+ with :
148+ path : vendor/bundle
149+ key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
150+ - run : |
151+ bundle config set path 'vendor/bundle'
152+ bundle install
153+ - run : bundle exec fastlane deployRelease
119154
120155 deploy-beta :
121156 name : Deploy to Play Store (Beta)
122157 runs-on : ubuntu-latest
123158 if : github.ref == 'refs/heads/development'
124159 needs : build
125-
126160 steps :
127161 - uses : actions/checkout@v3
128- - name : Deploy Beta
129- run : bundle exec fastlane deployBeta
162+ - uses : ruby/setup-ruby@v1
163+ with :
164+ ruby-version : ' 3.1'
165+ bundler-cache : true
166+ - uses : actions/cache@v4
167+ with :
168+ path : vendor/bundle
169+ key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
170+ - run : |
171+ bundle config set path 'vendor/bundle'
172+ bundle install
173+ - run : bundle exec fastlane deployBeta
130174
131175 deploy-firebase-internal :
132176 name : Distribute via Firebase (Internal)
133177 runs-on : ubuntu-latest
134178 if : startsWith(github.ref, 'refs/heads/internal-testing/')
135179 needs : build
136-
137180 steps :
138181 - uses : actions/checkout@v3
139- - name : Deploy Firebase Internal
140- run : bundle exec fastlane deployFirebase --verbose
182+ - uses : ruby/setup-ruby@v1
183+ with :
184+ ruby-version : ' 3.1'
185+ bundler-cache : true
186+ - uses : actions/cache@v4
187+ with :
188+ path : vendor/bundle
189+ key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
190+ - run : |
191+ bundle config set path 'vendor/bundle'
192+ bundle install
193+ - run : bundle exec fastlane deployFirebase --verbose
0 commit comments