Skip to content

Commit b67c219

Browse files
committed
Adds Upload Version Info input to build and fixes input related issues
1 parent 808b6b8 commit b67c219

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

.github/workflows/CI-main.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,21 @@ on:
1515
patch_version:
1616
description: "Patch Version Override - e.g. '999'"
1717
type: string
18-
ditribute:
18+
distribute:
1919
description: "Distribute to TestFlight"
2020
type: boolean
21-
default: false
2221
env:
2322
XCODE_VERSION: '15.4'
2423
DISTRIBUTE_TO_TESTFLIGHT: ${{ github.event_name == 'push' || inputs.distribute }}
2524
jobs:
2625
resolve-values:
2726
name: "Resolve values"
28-
runs-on: macos-14
27+
runs-on: ubuntu-latest
2928
outputs:
3029
version_name: ${{ steps.version_info.outputs.version_name }}
3130
version_number: ${{ steps.version_info.outputs.version_number }}
31+
xcode_version: ${{ env.XCODE_VERSION }}
32+
distribute_to_testflight: ${{ env.DISTRIBUTE_TO_TESTFLIGHT }}
3233
steps:
3334
- name: Log inputs to job summary
3435
run: |
@@ -88,6 +89,7 @@ jobs:
8889
build-variant: ${{ matrix.variant }}
8990
build-version: ${{ needs.resolve-values.outputs.version_name }}
9091
build-number: ${{ needs.resolve-values.outputs.version_number }}
91-
xcode-version: $XCODE_VERSION
92-
distribute: $DISTRIBUTE_TO_TESTFLIGHT
92+
xcode-version: ${{ needs.resolve-values.outputs.xcode_version }}
93+
distribute: ${{ fromJSON(needs.resolve-values.outputs.distribute_to_testflight) }}
94+
upload_version_info: false
9395
secrets: inherit

.github/workflows/build.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ on:
3131
patch_version:
3232
description: "Patch Version Override - e.g. '999'"
3333
type: string
34-
ditribute:
34+
distribute:
3535
description: "Distribute to TestFlight"
3636
type: boolean
37-
default: false
37+
default: true
3838
workflow_call:
3939
inputs:
4040
build-variant:
@@ -59,10 +59,12 @@ on:
5959
patch_version:
6060
description: "Patch Version Override - e.g. '999'"
6161
type: string
62-
ditribute:
62+
distribute:
6363
description: "Distribute to TestFlight"
6464
type: boolean
65-
default: false
65+
upload_version_info:
66+
description: "Upload version-info file - When false, caller may be handling it already"
67+
type: boolean
6668
env:
6769
BUILD_VARIANT: ${{ inputs.build-variant || 'Beta' }}
6870
XCODE_VERSION: ${{ inputs.xcode-version || '15.4' }}
@@ -125,6 +127,7 @@ jobs:
125127
echo "version_name=$(echo $content | jq -r .version_name)" >> $GITHUB_OUTPUT
126128
echo "version_number=$(echo $content | jq -r .version_number)" >> $GITHUB_OUTPUT
127129
- name: Upload version info artifact
130+
if: ${{ inputs.upload_version_info }}
128131
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
129132
with:
130133
name: version-info
@@ -358,7 +361,7 @@ jobs:
358361
--apiIssuer "${{ secrets.APP_STORE_CONNECT_TEAM_ISSUER }}"
359362
360363
- name: Upload app to TestFlight with Fastlane
361-
if: ${{ inputs.ditribute }}
364+
if: ${{ inputs.distribute }}
362365
run: |
363366
CHANGELOG="$(git show -s --format=%s)
364367
$GITHUB_REPOSITORY/$GITHUB_REF_NAME @ $GITHUB_SHA

0 commit comments

Comments
 (0)