-
Notifications
You must be signed in to change notification settings - Fork 26
90 lines (79 loc) · 2.99 KB
/
publish_firebase_app_distribution.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Publish build to Firebase App Distribution
on:
workflow_dispatch:
inputs:
module:
description: App module to compile
required: true
default: app
build_type:
description: Build type to compile (debug or release)
required: true
default: release
artifact_type:
description: Artifact type to compile (APK or AAB)
required: true
default: APK
tester_emails:
description: Comma separated list of tester e-mails to add
required: false
tester_groups:
description: Comma separated list of tester groups (by ID) to add
required: false
release_notes:
description: Release notes for the distribution
required: true
jobs:
cancel_previous:
name: Cancel previous runs
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
publish_firebase_app_distribution:
name: Publish build to Firebase App Distribution
runs-on: ubuntu-latest
needs: cancel_previous
steps:
- name: Checkout branch
uses: actions/checkout@v3
with:
fetch-depth: 0 # Whole repo history
- name: Fetch all tags
run: git fetch origin +refs/tags/*:refs/tags/*
- name: Install fastlane-plugin-android_build_tools deploy key
uses: shimataro/[email protected]
with:
key: ${{ secrets.ANDROID_BUILD_TOOLS_DEPLOY_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Set-up and configure JDK 11
uses: actions/[email protected]
with:
distribution: zulu
java-version: 11
cache: gradle
- name: Set-up and configure Ruby
uses: ruby/[email protected]
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install keysafe deploy key
uses: shimataro/[email protected]
with:
key: ${{ secrets.KEYSAFE_DEPLOY_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
if_key_exists: replace
- name: Publish build to Firebase App Distribution
env:
KEYSAFE_REPO_URL: ${{ secrets.KEYSAFE_REPO_URL }}
APP_KEYSAFE_NAME: ${{ secrets.APP_KEYSAFE_NAME }}
APP_KEYSAFE_PASSWORD: ${{ secrets.APP_KEYSAFE_PASSWORD }}
run: |
bundle exec fastlane run create_firebase_app_distribution_release app_name:"$APP_KEYSAFE_NAME" app_password:"$APP_KEYSAFE_PASSWORD" \
artifact_type:"${{ github.event.inputs.artifact_type }}" \
app_module:"${{ github.event.inputs.module }}" app_build_type:"${{ github.event.inputs.build_type }}" \
tester_emails:"${{ github.event.inputs.tester_emails }}" tester_groups:"${{ github.event.inputs.tester_groups }}" \
release_notes:"${{ github.event.inputs.release_notes }}"