-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (52 loc) · 1.75 KB
/
enterprise.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
name: Enterprise build
on:
push:
branches: [develop]
jobs:
enterprise:
name: Enterprise build
runs-on: [ubuntu-latest]
env:
# TODO Verify app distribution groups
APP_DISTRIBUTION_GROUPS: futured-qa, devs
APP_DISTRIBUTION_ARTIFACT_TYPE: APK
FIREBASE_CREDENTIALS_FILE: firebase_credentials.json
# TODO Platform-specific slack channel name for notifications, eg. "gmlh-android"
SLACK_CHANNEL: project-slack-channel-name
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
- name: Prepare environment
run: |
echo "BUILD_NUMBER=$((GITHUB_RUN_NUMBER))" >> $GITHUB_ENV
echo '${{ secrets.APP_DISTRIBUTION_SERVICE_ACCOUNT }}' > $FIREBASE_CREDENTIALS_FILE
- name: Run unit tests
shell: bash
run: ./gradlew --continue testDevEnterpriseUnitTest
- name: Assemble and upload to Firebase App Distribution
shell: bash
run: |
./gradlew \
assembleDevEnterprise \
appDistributionUploadDevEnterprise \
--serviceCredentialsFile="$FIREBASE_CREDENTIALS_FILE" \
--artifactType="$APP_DISTRIBUTION_ARTIFACT_TYPE" \
--groups="$APP_DISTRIBUTION_GROUPS"
- name: Slack Notification
if: failure()
uses: homoluctus/slatify@master
with:
type: "failure"
job_name: '*Enterprise build*'
username: GitHub
channel: ${{env.SLACK_CHANNEL}}
url: ${{secrets.SLACK_WEB_HOOK}}
commit: true
token: ${{secrets.GITHUB_TOKEN}}