Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the build and release workflow for Android #166

Merged
merged 35 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f192a98
Test the build step
LarsRefsgaard Jun 20, 2023
280efdf
Test once more
LarsRefsgaard Jun 20, 2023
ce366d9
Rename environment in deploy workflow
LarsRefsgaard Jun 22, 2023
f0f5fe3
Try using a file for Google creds for deploy
LarsRefsgaard Jun 23, 2023
2325624
Try with only file
LarsRefsgaard Jun 23, 2023
e307ae4
Update to latest ruby
LarsRefsgaard Jun 23, 2023
3497ca5
Update report and readme
LarsRefsgaard Jun 23, 2023
299a2cc
Update version code and remove report
LarsRefsgaard Jun 23, 2023
95acdd2
debug
LarsRefsgaard Jun 23, 2023
3a20443
im stupid
LarsRefsgaard Jun 23, 2023
c3c3045
Update ruby
LarsRefsgaard Jun 23, 2023
2fd4518
try again with different format for keystore
LarsRefsgaard Jun 23, 2023
33d72a8
Undo stuff for debugging
LarsRefsgaard Jun 23, 2023
3257f60
debug
LarsRefsgaard Jun 23, 2023
902a840
Use workflow dispatch
LarsRefsgaard Jun 23, 2023
4abd810
Oops
LarsRefsgaard Jun 23, 2023
e5263ba
update debug
LarsRefsgaard Jun 23, 2023
df389af
Debug
LarsRefsgaard Jun 23, 2023
777f8bc
debug 2
LarsRefsgaard Jun 23, 2023
93d233c
debug 3
LarsRefsgaard Jun 23, 2023
e3f0b2d
debug 4
LarsRefsgaard Jun 23, 2023
3884f93
somethign
LarsRefsgaard Jun 23, 2023
9a6532b
maybe run on macos
LarsRefsgaard Jun 23, 2023
c91fa18
enable again
LarsRefsgaard Jun 23, 2023
e99df33
asdasdasdasdasd
LarsRefsgaard Jun 23, 2023
85b61e2
add macos
LarsRefsgaard Jun 23, 2023
239958d
nvm
LarsRefsgaard Jun 23, 2023
5e4ee56
keystore
LarsRefsgaard Jun 23, 2023
2a353c7
maybe?
LarsRefsgaard Jun 23, 2023
827689f
debug a bit more
LarsRefsgaard Jun 23, 2023
5d93442
debug almost good
LarsRefsgaard Jun 23, 2023
3300c56
Use secrets: inherit in workflow
LarsRefsgaard Jun 23, 2023
f5fe52b
Try again
LarsRefsgaard Jun 26, 2023
2d77c8e
Merge branch 'master' into LarsRefsgaard/issue163
LarsRefsgaard Jul 25, 2023
94161cd
Change on conditions for Android deployment
LarsRefsgaard Jul 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/deploy_play_store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ jobs:
- name: Setup Fastlane
uses: ruby/setup-ruby@8a45918450651f5e4784b6031db26f4b9f76b251 # v1.150.0
with:
ruby-version: "2.6"
ruby-version: "head"
bundler-cache: true
working-directory: android

- name: Configure Keystore
run: |
echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > app/upload-keystore.jks
echo "$PLAY_STORE_CONFIG_JSON" > PLAY_STORE_CONFIG.json
echo "storeFile=upload-keystore.jks" >> key.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties
echo "storeFile=upload-keystore.jks" >> key.properties
env:
PLAY_STORE_UPLOAD_KEY: ${{ secrets.PLAY_STORE_UPLOAD_KEY }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
Expand All @@ -77,5 +77,5 @@ jobs:
- name: Deploy to Play Store
run: bundle exec fastlane ${{ inputs.lane || 'beta' }}
env:
PLAY_STORE_CONFIG_JSON: ${{ secrets.PLAY_STORE_CONFIG_JSON }}
PLAY_STORE_JSON_KEY: ${{ secrets.PLAY_STORE_JSON_KEY }}
working-directory: android
10 changes: 6 additions & 4 deletions .github/workflows/deploy_play_store_beta.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
name: Deploy to Play Store beta
on:
# Enable manual run
push:
branches:
- 'master'
tags:
- '*'
workflow_dispatch:



# Declare default permissions as read only.
permissions: read-all

jobs:
workflow_run:
uses: cph-cachet/carp-studies-app/.github/workflows/deploy_play_store.yml@master
uses: cph-cachet/carp-studies-app/.github/workflows/deploy_play_store.yml@LarsRefsgaard/issue163
secrets: inherit
with:
lane: 'beta'
9 changes: 5 additions & 4 deletions .github/workflows/deploy_play_store_prod.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Deploy to Play Store production
on:
# Enable manual run
push:
tags:
- '*'
release:
types:
- released
workflow_dispatch:


# Declare default permissions as read only.
Expand All @@ -12,5 +12,6 @@ permissions: read-all
jobs:
workflow_run:
uses: cph-cachet/carp-studies-app/.github/workflows/deploy_play_store.yml@master
secrets: inherit
with:
lane: 'promote_to_production'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,4 @@ app.*.map.json
lib/blocs/credentials.dart
carp/carpspec.yaml
android/key.properties
android/fastlane/report.xml
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (flutterRoot == null) {

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '18'
flutterVersionCode = '19'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
Expand Down
2 changes: 1 addition & 1 deletion android/fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
package_name("dk.cachet.carp_study_app") #
json_key_file("PLAY_STORE_CONFIG.json")
json_key_file("PLAY_STORE_CONFIG.json")