generated from StanfordSpezi/SpeziTemplateApplication
-
-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (86 loc) · 2.78 KB
/
beta-deployment.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
#
# This source file is part of the ENGAGE-HF based on the Stanford Spezi Template Application project
#
# SPDX-FileCopyrightText: 2023 Stanford University
#
# SPDX-License-Identifier: MIT
#
name: Beta Deployment
on:
push:
branches:
- main
- fixDeployment
workflow_dispatch:
inputs:
environment:
description: |
The GitHub deployment environment.
required: true
default: 'development'
type: choice
options:
- development
- staging
- production
workflow_call:
inputs:
environment:
description: |
The GitHub deployment environment.
required: false
type: string
default: staging
concurrency:
group: Beta-Deployment
cancel-in-progress: false
jobs:
determineenvironment:
name: Determine Environment
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.determineenvironment.outputs.environment }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Determine Environment
id: determineenvironment
run: |
if [[ -z "${{ inputs.environment }}" ]]; then
echo "environment=staging" >> $GITHUB_OUTPUT
else
echo "environment=${{ inputs.environment }}" >> $GITHUB_OUTPUT
fi
vars:
name: Inject Environment Variables In Deployment Workflow
needs: determineenvironment
runs-on: ubuntu-latest
environment: ${{ needs.determineenvironment.outputs.environment }}
outputs:
appidentifier: ${{ vars.APP_IDENTIFIER }}
provisioningProfileName: ${{ vars.PROVISIONING_PROFILE_NAME }}
steps:
- run: |
echo "Injecting Environment Variables In Deployment Workflow ..."
echo "appidentifier: ${{ vars.APP_IDENTIFIER }}"
echo "provisioningProfileName: ${{ vars.PROVISIONING_PROFILE_NAME }}"
# buildandtest:
# name: Build and Test
# needs: determineenvironment
# uses: ./.github/workflows/build-and-test.yml
# permissions:
# contents: read
# secrets: inherit
iosapptestflightdeployment:
name: iOS App TestFlight Deployment
needs: [determineenvironment, vars] # buildandtest
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
permissions:
contents: read
with:
runsonlabels: '["macOS", "self-hosted"]'
environment: ${{ needs.determineenvironment.outputs.environment }}
googleserviceinfoplistpath: 'ENGAGEHF/Supporting Files/GoogleService-Info.plist'
setupsigning: true
fastlanelane: deploy environment:"${{ needs.determineenvironment.outputs.environment }}" appidentifier:"${{ needs.vars.outputs.appidentifier }}" provisioningProfile:"${{ needs.vars.outputs.provisioningProfileName }}"
secrets: inherit