-
Notifications
You must be signed in to change notification settings - Fork 13
45 lines (41 loc) · 1.44 KB
/
build-release-sample-apps.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
name: Publish Release Sample App
on:
workflow_dispatch:
inputs:
sdk_version:
description: "SDK version to build sample app with (optional, e.g., 4.1.0, defaults to latest)"
required: false
type: string
jobs:
determine-branch:
runs-on: ubuntu-latest
outputs:
branch_name: ${{ steps.get_branch.outputs.branch }}
steps:
- name: Extract Branch Name
id: get_branch
run: echo "branch=$(echo $GITHUB_REF_NAME)" >> $GITHUB_OUTPUT
determine-sdk-version:
runs-on: ubuntu-latest
outputs:
resolved_version: ${{ steps.get_version.outputs.sdk_version }}
steps:
- name: Get Latest SDK Version (if not provided)
id: get_version
run: |
if [[ -z "${{ inputs.sdk_version }}" ]]; then
LATEST_VERSION=$(npm show customerio-reactnative version)
echo "Using latest SDK version: $LATEST_VERSION"
echo "sdk_version=$LATEST_VERSION" >> $GITHUB_OUTPUT
else
echo "sdk_version=${{ inputs.sdk_version }}" >> $GITHUB_OUTPUT
fi
build-sample-app:
needs: [determine-branch, determine-sdk-version]
uses: ./.github/workflows/build-sample-app.yml
with:
app_name: "APN"
branch_name: ${{ needs.determine-branch.outputs.branch_name }}
cio-workspace-name: "Mobile: React Native"
sdk_version: ${{ needs.determine-sdk-version.outputs.resolved_version }}
secrets: inherit