Skip to content

Commit 0739421

Browse files
committed
chore: fix public release branch name
1 parent 529522a commit 0739421

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

.github/workflows/build-release-sample-apps.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ on:
99
type: string
1010

1111
jobs:
12+
determine-branch:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
branch_name: ${{ steps.get_branch.outputs.branch }}
16+
steps:
17+
- name: Extract Branch Name
18+
id: get_branch
19+
run: echo "branch=$(echo $GITHUB_REF_NAME)" >> $GITHUB_OUTPUT
20+
1221
determine-sdk-version:
1322
runs-on: ubuntu-latest
1423
outputs:
@@ -26,10 +35,11 @@ jobs:
2635
fi
2736
2837
build-sample-app:
29-
needs: determine-sdk-version
38+
needs: [determine-branch, determine-sdk-version]
3039
uses: ./.github/workflows/build-sample-app.yml
3140
with:
3241
app_name: "APN"
42+
branch_name: ${{ needs.determine-branch.outputs.branch_name }}
3343
cio-workspace-name: "Mobile: React Native"
3444
sdk_version: ${{ needs.determine-sdk-version.outputs.resolved_version }}
3545
secrets: inherit

.github/workflows/build-sample-app.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
description: "Name of the sample app to build"
88
required: true
99
type: string
10+
branch_name:
11+
description: "Branch name for versioning"
12+
required: false
13+
type: string
1014
cio-workspace-name:
1115
description: "Name of the Customer.io workspace to use"
1216
required: true
@@ -97,7 +101,12 @@ jobs:
97101
with:
98102
subdirectory: Apps/${{ inputs.app_name }}
99103
lane: "generate_new_version"
100-
options: '{"branch_name":"${{ github.ref_name }}", "pull_request_number":"${{ github.event.pull_request.number }}", "sdk_version":"${{ inputs.sdk_version }}"}'
104+
options: >
105+
{
106+
"branch_name": "${{ inputs.branch_name || github.ref_name }}",
107+
"pull_request_number": "${{ github.event.pull_request.number }}",
108+
"sdk_version": "${{ inputs.sdk_version }}"
109+
}
101110
102111
- name: Export App and SDK Version Info
103112
id: export-vars

Apps/fastlane/helpers/version_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
branch_name = github.pr_source_branch
1111
elsif github.is_commit_pushed
1212
branch_name = github.push_branch
13+
else
14+
branch_name = options[:branch_name] || "manual-release"
1315
end
1416

1517
# Replace '/' with '-' to avoid issues with unsupported characters in version name

0 commit comments

Comments
 (0)