Skip to content

Commit 9e8d63b

Browse files
fix(ci): set MARKETING_VERSION from package.json for TestFlight upload (#719)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 290ae26 commit 9e8d63b

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/ios-testflight-release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,17 @@ jobs:
5555
working-directory: standalone/webapp
5656
run: pnpm exec cap sync ios
5757

58-
- name: Generate build number
59-
run: echo "BUILD_NUMBER=$(date +'%Y%m%d%H%M')" >> "$GITHUB_ENV"
58+
- name: Resolve marketing version and build number
59+
run: |
60+
MARKETING_VERSION=$(node -p "require('./standalone/webapp/package.json').version")
61+
echo "MARKETING_VERSION=$MARKETING_VERSION" >> "$GITHUB_ENV"
62+
echo "BUILD_NUMBER=$(date +'%Y%m%d%H%M')" >> "$GITHUB_ENV"
6063
6164
- name: Build iOS app (Fastlane)
6265
working-directory: standalone/webapp
6366
env:
6467
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
68+
MARKETING_VERSION: ${{ env.MARKETING_VERSION }}
6569
MATCH_GITLAB_AUTH: ${{ secrets.IOS_MATCH_GITLAB_AUTH }}
6670
MATCH_PASSWORD: ${{ secrets.IOS_MATCH_PASSWORD }}
6771
MATCH_GIT_URL: ${{ vars.IOS_MATCH_GIT_URL }}

standalone/webapp/fastlane/Fastfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ platform :ios do
3232
team_id: team_id
3333
)
3434

35+
if ENV["MARKETING_VERSION"] && !ENV["MARKETING_VERSION"].empty?
36+
increment_version_number(
37+
version_number: ENV["MARKETING_VERSION"],
38+
xcodeproj: XCODE_PROJECT
39+
)
40+
end
41+
3542
if ENV["BUILD_NUMBER"] && !ENV["BUILD_NUMBER"].empty?
3643
increment_build_number(
3744
build_number: ENV["BUILD_NUMBER"],

0 commit comments

Comments
 (0)