-
Notifications
You must be signed in to change notification settings - Fork 61
72 lines (61 loc) · 2.3 KB
/
release_wallet_android_internal.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
name: Android Wallet (internal) deploy
on:
workflow_dispatch:
pull_request:
types:
- closed
jobs:
build:
if: (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop') || github.event_name == 'workflow_dispatch'
runs-on: macos-latest-xlarge
steps:
# Checkout the repo
- name: Checkout repository
uses: actions/checkout@v4
# Install Java 17
- name: Install Java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
architecture: x86_64
cache: 'gradle'
# Cache Gradle
- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# Install Flutter and Dependencies
- uses: ./.github/actions/dependencies
- name: Add Secrets file
working-directory: example/wallet/android
run: touch secrets.properties && echo "${{ secrets.SECRETS_FILE }}" >> secrets.properties
- name: Add Keystore file
working-directory: example/wallet/android
run: echo "${{ secrets.KEYSTORE }}" | base64 --decode >> app/debug.keystore
# Fastlane
- name: Fastlane
working-directory: example/wallet/android
env:
FLAVOR: "internal"
PROJECT_ID: ${{ secrets.WALLET_PROJECT_ID }}
SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
FIREBASE_WALLET_ID: ${{ secrets.FIREBASE_WALLET_ID_INTERNAL }}
DOWNLOAD_URL: ${{ secrets.DOWNLOAD_URL_WALLET_INTERNAL }}
run: |
PUBSPEC_FILE=../../../pubspec.yaml
FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE)
PARTS=(${FILE_VALUE//:/ })
FULL_VERSION=${PARTS[1]}
VERSION_NUMBER=(${FULL_VERSION//-/ })
fastlane add_plugin firebase_app_distribution
fastlane release_firebase project_id:$PROJECT_ID app_version:$VERSION_NUMBER
# Launch locally
# Remove build: if:
# act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_wallet_android.yml