-
Notifications
You must be signed in to change notification settings - Fork 7
78 lines (69 loc) · 2.85 KB
/
android-release-playstore.yaml
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
name: Deploy the Android app to Playstore internal track
on:
workflow_dispatch:
inputs:
version:
description: Build version (eg 0.30.0)
required: true
build-number:
description: Build number
required: true
message:
description: Change logs
required: false
jobs:
build:
runs-on: [ self-hosted, internal-chplay ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: "17"
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.24.0"
channel: stable
- name: Set env
run: |
echo "FLUTTER_VERSION_NAME=${{ github.event.inputs.version }}" >> $GITHUB_ENV
echo "FLUTTER_VERSION_CODE=${{ github.event.inputs.build-number }}" >> $GITHUB_ENV
echo "BRANCH_KEY=${{ secrets.BRANCH_KEY }}" >> $GITHUB_ENV
echo "BRANCH_KEY_TEST=${{ secrets.BRANCH_KEY_TEST }}" >> $GITHUB_ENV
echo "SIGNATURE_HASH=${{ secrets.SIGNATURE_HASH }}" >> $GITHUB_ENV
echo "SIGNATURE_HASH_INHOUSE=${{ secrets.SIGNATURE_HASH_INHOUSE }}" >> $GITHUB_ENV
echo NAME_SUFFIX=main-${{ github.event.inputs.build-number }} >> $GITHUB_ENV
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.KEY_VAULT_DEPLOYMENT_KEY }}
${{ secrets.SSH_ASSETS_KEY }}
- name: Create env file
run: |
touch .env
echo -e "${{ secrets.PRODUCTION_ENV_VARS }}" | sed 's/\\n/\n/g' >> .env
cat .env
- name: Submodules update
run: git -c submodule.auto-test.update=none submodule update --init --recursive
- run: flutter pub cache repair
- run: flutter pub get
- name: Clone the Key Vault
run: |
git clone [email protected]:bitmark-inc/mobile-signing-key-vault.git --depth 1
cp mobile-signing-key-vault/android/bitmark-autonomy/release.keystore android/release.keystore
cp mobile-signing-key-vault/android/bitmark-autonomy/release.properties android/release.properties
- run: flutter build appbundle --flavor production --release
- name: Release notes
run: |
mkdir whatsnew
echo "${{ github.event.inputs.message }}" > ./whatsnew/whatsnew-en-US
# Upload APK to Google Play Internal Testing track
- name: Upload APK to Google Play
uses: r0adkll/[email protected]
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}
packageName: com.bitmark.autonomy_client
releaseFiles: build/app/outputs/bundle/productionRelease/app-production-release.aab
track: internal
mappingFile: build/app/outputs/mapping/productionRelease/mapping.txt
whatsNewDirectory: ./whatsnew