forked from RocketChat/Rocket.Chat.ReactNative
-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (95 loc) · 3.48 KB
/
build-official-android.yml
File metadata and controls
108 lines (95 loc) · 3.48 KB
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
98
99
100
101
102
103
104
105
106
107
108
name: Build Android And Upload
on:
workflow_call:
inputs:
type:
type: string
required: true
trigger:
type: string
required: false
default: pr
jobs:
build-hold:
name: Hold
runs-on: ubuntu-latest
if: ${{ inputs.trigger == 'pr' }}
environment: official_android_build
steps:
- run: echo "Waiting for manual approval..."
build-android:
name: Build
runs-on: ubuntu-latest
needs: build-hold
if: ${{ inputs.type == 'official' && (always() && (needs.build-hold.result == 'success' || needs.build-hold.result == 'skipped')) }}
outputs:
BUILD_VERSION: ${{ steps.version.outputs.BUILD_VERSION }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Checkout and Setup Node
uses: ./.github/actions/setup-node
- name: Fetch supported versions from Cloud
uses: ./.github/actions/fetch-supported-versions
with:
build_name: 'android-official'
- name: Generate Build Version
id: version
uses: ./.github/actions/generate-build-version
with:
RN_VARIABLES_PAT: ${{ secrets.RN_VARIABLES_PAT }}
- name: Build Android
uses: ./.github/actions/build-android
timeout-minutes: 40
with:
type: official
GOOGLE_SERVICES_ANDROID: ${{ secrets.GOOGLE_SERVICES_ANDROID }}
KEYSTORE_OFFICIAL_BASE64: ${{ secrets.KEYSTORE_OFFICIAL_BASE64 }}
KEYSTORE_OFFICIAL: ${{ secrets.KEYSTORE_OFFICIAL }}
KEYSTORE_OFFICIAL_PASSWORD: ${{ secrets.KEYSTORE_OFFICIAL_PASSWORD }}
KEYSTORE_OFFICIAL_ALIAS: ${{ secrets.KEYSTORE_OFFICIAL_ALIAS }}
BUGSNAG_KEY_OFFICIAL: ${{ secrets.BUGSNAG_KEY_OFFICIAL }}
BUILD_VERSION: ${{ steps.version.outputs.BUILD_VERSION }}
upload-hold:
name: Upload Hold
runs-on: ubuntu-latest
if: ${{ inputs.trigger == 'pr' }}
environment: upload_official_android
needs: [build-android]
outputs:
BUILD_VERSION: ${{ needs.build-android.outputs.BUILD_VERSION }}
steps:
- run: echo "Waiting for manual approval..."
upload-android:
name: Upload
runs-on: ubuntu-latest
needs: [build-android, upload-hold]
if: ${{ inputs.type == 'official' && (always() && (needs.upload-hold.result == 'success' || needs.upload-hold.result == 'skipped')) }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Upload Android
uses: ./.github/actions/upload-android
with:
type: official
trigger: ${{ inputs.trigger }}
FASTLANE_GOOGLE_SERVICE_ACCOUNT: ${{ secrets.FASTLANE_GOOGLE_SERVICE_ACCOUNT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_VERSION: ${{ needs.build-android.outputs.BUILD_VERSION }}
upload-internal:
name: Internal Sharing
runs-on: ubuntu-latest
needs: [build-android]
if: ${{ inputs.type == 'official' && inputs.trigger == 'pr' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Checkout and Setup Node
uses: ./.github/actions/setup-node
- name: Upload Internal Sharing
uses: ./.github/actions/upload-internal-android
with:
type: official
FASTLANE_GOOGLE_SERVICE_ACCOUNT: ${{ secrets.FASTLANE_GOOGLE_SERVICE_ACCOUNT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_VERSION: ${{ needs.build-android.outputs.BUILD_VERSION }}