77 workflow_dispatch :
88 inputs :
99 version :
10- description : ' Version to use (e.g. 1.2.3). Required for manual runs.'
10+ description : " Version to use (e.g. 1.2.3). Required for manual runs."
1111 required : true
12- default : ' '
12+ default : " "
1313 release_notes :
14- description : ' Release notes to include in the GitHub Release'
14+ description : " Release notes to include in the GitHub Release"
1515 required : false
16- default : ' '
16+ default : " "
1717 deploy_to_playstore :
18- description : ' Deploy to Google Play Store after release'
18+ description : " Deploy to Google Play Store after release"
1919 required : false
2020 type : boolean
2121 default : false
2222 playstore_track :
23- description : ' Play Store release track'
23+ description : " Play Store release track"
2424 required : false
2525 type : choice
26- default : ' internal'
26+ default : " internal"
2727 options :
2828 - internal
2929 - alpha
4040 outputs :
4141 version : ${{ steps.version.outputs.version }}
4242 release_notes : ${{ steps.release_notes.outputs.LOG }}
43-
43+
4444 steps :
4545 - name : Checkout code
4646 uses : actions/checkout@v4
5252 run : |
5353 echo "Recent tags:"
5454 git tag --sort=-v:refname | head -n 5
55-
55+
5656 if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
5757 CURRENT_REF="${{ github.ref_name }}"
5858 PREVIOUS_TAG=$(git describe --tags --abbrev=0 "${CURRENT_REF}^" 2>/dev/null || echo "")
6262 fi
6363
6464 echo "Generating notes from '$PREVIOUS_TAG' to '$CURRENT_REF'"
65-
65+
6666 if [[ -z "$PREVIOUS_TAG" ]]; then
6767 echo "No previous tag found. Getting last 20 commits."
6868 COMMITS=$(git log -n 20 --pretty=format:"- %s (%h)" "$CURRENT_REF")
9595 build-android :
9696 needs : prepare
9797 runs-on : ubuntu-latest
98-
98+
9999 steps :
100100 - name : Checkout code
101101 uses : actions/checkout@v4
@@ -184,7 +184,7 @@ jobs:
184184 build-ios :
185185 needs : prepare
186186 runs-on : macos-15
187-
187+
188188 steps :
189189 - name : Checkout code
190190 uses : actions/checkout@v4
@@ -213,7 +213,7 @@ jobs:
213213 - name : Setup Ruby
214214 uses : ruby/setup-ruby@v1
215215 with :
216- ruby-version : ' 3.2'
216+ ruby-version : " 3.2"
217217 bundler-cache : false
218218
219219 - name : Install CocoaPods
@@ -222,7 +222,7 @@ jobs:
222222 - name : Setup Go
223223 uses : actions/setup-go@v5
224224 with :
225- go-version : ' 1.22.x'
225+ go-version : " 1.22.x"
226226
227227 - name : Install iOS dependencies
228228 run : |
@@ -261,13 +261,35 @@ jobs:
261261 echo "Creating unsigned IPA for AltStore/Sideloadly..."
262262 mkdir -p "$PWD/build/output/Payload"
263263
264+ # Investigate archive structure
265+ echo "Examining archive structure..."
266+ ls -la "$PWD/build/CBProProxy.xcarchive/"
267+ ls -la "$PWD/build/CBProProxy.xcarchive/Products/" || true
268+
269+ # Find .app bundle (unsigned builds may place it differently)
270+ APP_PATH=""
264271 if [ -d "$PWD/build/CBProProxy.xcarchive/Products/Applications/CBVVPN.app" ]; then
265- cp -r "$PWD/build/CBProProxy.xcarchive/Products/Applications/CBVVPN.app" "$PWD/build/output/Payload/"
272+ APP_PATH="$PWD/build/CBProProxy.xcarchive/Products/Applications/CBVVPN.app"
273+ echo "✅ Found app at: Products/Applications/CBVVPN.app"
274+ elif [ -d "$PWD/build/CBProProxy.xcarchive/Products/CBVVPN.app" ]; then
275+ APP_PATH="$PWD/build/CBProProxy.xcarchive/Products/CBVVPN.app"
276+ echo "✅ Found app at: Products/CBVVPN.app"
266277 else
267- echo "Error: App not found in archive"
268- exit 1
278+ # Search for .app anywhere in archive
279+ APP_PATH=$(find "$PWD/build/CBProProxy.xcarchive" -name "CBVVPN.app" -type d | head -n 1)
280+ if [ -n "$APP_PATH" ]; then
281+ echo "✅ Found app at: $APP_PATH"
282+ else
283+ echo "❌ Error: CBVVPN.app not found in archive"
284+ echo "Archive contents:"
285+ find "$PWD/build/CBProProxy.xcarchive" -type d -maxdepth 3
286+ exit 1
287+ fi
269288 fi
270289
290+ # Copy the .app to Payload
291+ cp -r "$APP_PATH" "$PWD/build/output/Payload/"
292+
271293 # Remove existing code signatures (AltStore will re-sign)
272294 find "$PWD/build/output/Payload/CBVVPN.app" -name "_CodeSignature" -type d -prune -exec rm -rf {} +
273295 find "$PWD/build/output/Payload/CBVVPN.app" -name "embedded.mobileprovision" -type f -exec rm -f {} +
@@ -296,7 +318,7 @@ jobs:
296318 needs : [prepare, build-android, build-ios]
297319 runs-on : ubuntu-latest
298320 if : always() && (needs.build-android.result == 'success' || needs.build-ios.result == 'success')
299-
321+
300322 steps :
301323 - name : Download Android APK
302324 if : needs.build-android.result == 'success'
@@ -372,15 +394,15 @@ jobs:
372394 runs-on : ubuntu-latest
373395 if : github.event.inputs.deploy_to_playstore == 'true'
374396 timeout-minutes : 30
375-
397+
376398 steps :
377399 - name : Checkout code
378400 uses : actions/checkout@v4
379401
380402 - name : Setup Ruby
381403 uses : ruby/setup-ruby@v1
382404 with :
383- ruby-version : ' 3.2'
405+ ruby-version : " 3.2"
384406 bundler-cache : false
385407
386408 - name : Setup Fastlane
@@ -434,14 +456,14 @@ jobs:
434456 repo: context.repo.repo,
435457 tag: tagName
436458 });
437-
459+
438460 const track = '${{ github.event.inputs.playstore_track }}' || 'internal';
439461 const newBody = release.data.body + '\n\n---\n\n## 🏪 Google Play Store Deployment\n\n' +
440462 '✅ Successfully deployed to **' + track + '** track\n' +
441463 '- **Version**: ${{ needs.prepare.outputs.version }}\n' +
442464 '- **Build Number**: ${{ github.run_number }}\n' +
443465 '- **Deployed at**: ' + new Date().toISOString();
444-
466+
445467 await github.rest.repos.updateRelease({
446468 owner: context.repo.owner,
447469 repo: context.repo.repo,
0 commit comments