Skip to content

Commit be1ee27

Browse files
committed
common
1 parent 75699ee commit be1ee27

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: common_quickstart_framework
16+
17+
permissions:
18+
contents: read
19+
20+
on:
21+
workflow_call:
22+
inputs:
23+
product:
24+
required: true
25+
type: string
26+
zip_run_id:
27+
required: true
28+
type: string
29+
artifact_name:
30+
required: true
31+
type: string
32+
setup_command:
33+
required: true
34+
type: string
35+
plist_src_path:
36+
required: true
37+
type: string
38+
plist_dst_path:
39+
required: true
40+
type: string
41+
os:
42+
required: false
43+
type: string
44+
default: macos-15
45+
xcode:
46+
required: false
47+
type: string
48+
default: Xcode_16.4
49+
secrets:
50+
plist_secret:
51+
required: true
52+
github_token:
53+
required: true
54+
55+
jobs:
56+
quickstart_framework:
57+
if: ${{ !cancelled() }}
58+
env:
59+
plist_secret: ${{ secrets.plist_secret }}
60+
SDK: ${{ inputs.product }}
61+
runs-on: ${{ inputs.os }}
62+
steps:
63+
- uses: actions/checkout@v4
64+
- name: Get framework dir
65+
uses: actions/[email protected]
66+
with:
67+
name: ${{ inputs.artifact_name }}
68+
run-id: ${{ inputs.zip_run_id }}
69+
github-token: ${{ secrets.github_token }}
70+
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
71+
- name: Xcode
72+
run: sudo xcode-select -s /Applications/${{ inputs.xcode }}.app/Contents/Developer
73+
- name: Setup Bundler
74+
run: ./scripts/setup_bundler.sh
75+
- name: Move frameworks
76+
run: |
77+
mkdir -p "${HOME}"/ios_frameworks/
78+
find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
79+
- name: Setup quickstart
80+
run: ${{ inputs.setup_command }}
81+
- name: Install Secret GoogleService-Info.plist
82+
run: scripts/decrypt_gha_secret.sh ${{ inputs.plist_src_path }} \
83+
${{ inputs.plist_dst_path }} "$plist_secret"
84+
- name: Test Quickstart
85+
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
86+
- uses: actions/upload-artifact@v4
87+
if: failure()
88+
with:
89+
name: quickstart_artifacts_${{ inputs.product }}_${{ inputs.artifact_name }}
90+
path: |
91+
quickstart-ios/
92+
!quickstart-ios/**/GoogleService-Info.plist

0 commit comments

Comments
 (0)