Skip to content

Build & Deploy on Workflow Dispatch #9

Build & Deploy on Workflow Dispatch

Build & Deploy on Workflow Dispatch #9

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/${{env.build_type}}/app-${{env.build_type}}.apk