-
Notifications
You must be signed in to change notification settings - Fork 25
56 lines (53 loc) · 1.85 KB
/
test-appetize.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
# Manually trigger an android build and deploy to Appetize.io
name: Test Appetize
concurrency:
group: test-appetize-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
types: [labeled, synchronize]
branches:
- deployment/*
- master
jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'Test - appetize')
uses: ./.github/workflows/android-build.yml
secrets: inherit
with:
# use branch name from PR target as default
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
deployment: ${{ github.base_ref }}
debug-apk: true
release-bundle: false
test_appetize:
needs: build
runs-on: ubuntu-latest
# Use deployment-dependent environment which populates appetize secrets accordingly
environment:
name: ${{ needs.build.outputs.DEPLOYMENT_NAME }}
env:
DEPLOYMENT_NAME: ${{ needs.build.outputs.DEPLOYMENT_NAME }}
steps:
- name: Download Build Artifact
id: download
uses: actions/download-artifact@v3
with:
name: debug_apk
path: ./
- name: Upload to Appetize.io
id: upload
uses: maxep/[email protected]
with:
api-token: ${{ secrets.APPETIZE_TOKEN }}
file-path: ${{ steps.download.outputs.download-path }}/app-debug.apk
platform: "android"
timeout: 30
# Include to overwrite existing app instead of creating new (will only allow single build at a time)
public-key: ${{secrets.APPETIZE_APP_KEY}}
- name: "Post to PR"
uses: marocchino/sticky-pull-request-comment@v2
with:
message: |
**Android Appetize URL**
${{ steps.upload.outputs.APPETIZE_APP_URL }}?device=pixel4&osVersion=12.0&scale=75