Skip to content

Commit

Permalink
Add Firebase Deployment GitHub Actions and Capabilities (#41)
Browse files Browse the repository at this point in the history
# Add Firebase Deployment GitHub Actions and Capabilities

## ⚙️ Release Notes 
- Adds mechanism to provide a Google services info plist using GitHub
secrets


## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
PSchmiedmayer authored Nov 5, 2023
1 parent c2a356a commit 699c0e0
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/xcodebuild-or-fastlane.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#
# This source file is part of the Stanford Spezi open-source project
# It is a copy of the xcodebuild-or-fastlane.yml GitHub Action workflow as copied from the Stanford Biodesign Digital Health organization.
# This source file is part of the Stanford Biodesign Digital Health Group open-source organization
#
# SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md)
#
Expand Down Expand Up @@ -77,6 +76,11 @@ on:
required: false
type: boolean
default: false
googleserviceinfoplistpath:
description: 'Path to the GoogleService-Info.plist file that is replaced using the content found in the secret GOOGLE_SERVICE_INFO_PLIST'
required: false
type: string
default: ''
codeql:
description: 'Use CodeQL code scanning'
required: false
Expand Down Expand Up @@ -114,8 +118,11 @@ on:
APPLE_ID:
description: 'The Apple ID you use to access the App Store Connect API.'
required: false
checkout_token:
description: "The Personal access token (PAT) to use with the checkout action"
CHECKOUT_TOKEN:
description: 'The Personal access token (PAT) to use with the checkout action'
required: false
GOOGLE_SERVICE_INFO_PLIST_BASE64:
description: 'The Base64 version of the GoogleService-Info.plist file that is used to replace the file found at googleserviceinfoplistpath if the arguemnt is set.'
required: false

jobs:
Expand All @@ -129,9 +136,8 @@ jobs:
- uses: actions/checkout@v4
with:
# This is GitHubs way of implementing ternary expressions (see https://docs.github.com/en/actions/learn-github-actions/expressions)
token: ${{ secrets.checkout_token != '' && secrets.checkout_token || github.token }}
token: ${{ secrets.CHECKOUT_TOKEN != '' && secrets.CHECKOUT_TOKEN || github.token }}
submodules: ${{ inputs.checkout_submodules }}

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ inputs.xcodeversion }}
Expand Down Expand Up @@ -208,6 +214,10 @@ jobs:
SECONDARY_UUID=`grep UUID -A1 -a $PP_SECONDARY_PATH | grep -io "[-A-F0-9]\{36\}"`
cp $PP_SECONDARY_PATH ~/Library/MobileDevice/Provisioning\ Profiles/$SECONDARY_UUID.mobileprovision
fi
- name: Setup Google Services File
if: ${{ inputs.googleserviceinfoplistpath != '' }}
run: |
echo -n "${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }}" | base64 --decode -o "${{ inputs.googleserviceinfoplistpath }}"
- name: Initialize CodeQL
if: ${{ !env.selfhosted && inputs.codeql }}
uses: github/codeql-action/init@v2
Expand Down

0 comments on commit 699c0e0

Please sign in to comment.