-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (45 loc) · 1.2 KB
/
build_and_deploy_on_workflow_dispatch.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
name: Build & Deploy on Workflow Dispatch
on:
workflow_dispatch:
inputs:
variants:
description: Select Variant
required: true
default: 'debug'
type: choice
options:
- 'debug'
- 'release'
notes:
description: Enter release notes
required: false
type: string
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Map options
uses: kanga333/variable-mapper@master
id: mapper
with:
key: ${{inputs.variants}}
map: |
{
"debug": {
"build_type": "Debug"
},
"release": {
"build_type": "Release"
}
}
export_to: env
- name: build
run: ./gradlew assemble${{env.build_type}}
- name: deploy
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID}}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: testers
file: app/build/outputs/apk/${{inputs.variants}}/app-${{inputs.variants}}.apk