Compare commits

..

1 Commits

Author SHA1 Message Date
Admin
2efad547b5 ci: inline simple just calls in ios-release, keep just only for complex xcodebuild steps
Some checks failed
CI / Scraper / Test (pull_request) Successful in 9s
CI / Scraper / Lint (pull_request) Successful in 14s
CI / Scraper / Docker Push (pull_request) Has been skipped
CI / UI / Build (pull_request) Successful in 22s
CI / UI / Docker Push (pull_request) Has been skipped
iOS CI / Build (push) Has been cancelled
iOS CI / Test (push) Has been cancelled
iOS Release / Release to TestFlight (push) Has been cancelled
iOS CI / Build (pull_request) Successful in 1m34s
iOS CI / Test (pull_request) Has been cancelled
2026-03-09 12:41:17 +05:00
5 changed files with 28 additions and 53 deletions

View File

@@ -6,8 +6,8 @@ on:
- "ios-v*"
concurrency:
group: ios-macos-runner
cancel-in-progress: false
group: ${{ gitea.workflow }}-${{ gitea.ref }}
cancel-in-progress: true
jobs:
# ── archive & release to TestFlight ──────────────────────────────────────
@@ -32,7 +32,10 @@ jobs:
run: command -v just || brew install just
- name: Set build number from run number
run: just ios-set-build-number ${{ gitea.run_number }}
run: |
sed -i '' \
's/CURRENT_PROJECT_VERSION: .*/CURRENT_PROJECT_VERSION: ${{ gitea.run_number }}/' \
ios/LibNovel/project.yml
- name: Import signing certificate
env:
@@ -45,20 +48,11 @@ jobs:
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
echo "$CERTIFICATE_BASE64" | base64 --decode > $RUNNER_TEMP/cert.p12
echo "DEBUG: p12 file size: $(wc -c < $RUNNER_TEMP/cert.p12) bytes"
echo "DEBUG: p12 first bytes (hex): $(xxd $RUNNER_TEMP/cert.p12 | head -2)"
echo "DEBUG: import result:"
security import $RUNNER_TEMP/cert.p12 \
-P "$CERTIFICATE_PASSWORD" \
-A -t cert -f pkcs12 \
-k $KEYCHAIN_PATH && echo "import OK" || echo "import FAILED exit $?"
security list-keychain -d user -s $KEYCHAIN_PATH $(security list-keychains -d user | tr -d '"' | xargs)
echo "DEBUG: keychain list:"
security list-keychains -d user
echo "DEBUG: all certs in keychain (not just codesigning):"
security find-certificate -a $KEYCHAIN_PATH 2>&1 | grep "labl\|subj" || echo "none"
echo "DEBUG: signing identities found:"
security find-identity -v -p codesigning
-k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Import provisioning profile
env:
@@ -66,9 +60,8 @@ jobs:
run: |
PP_PATH=$RUNNER_TEMP/profile.mobileprovision
echo "$PROFILE_BASE64" | base64 --decode > $PP_PATH
UUID=$(security cms -D -i "$PP_PATH" | plutil -extract UUID raw -)
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles/$UUID.mobileprovision
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles/
- name: Write App Store Connect API key
env:
@@ -89,31 +82,25 @@ jobs:
- name: Archive
env:
USER: runner
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
PROFILE_UUID=$(security cms -D -i $RUNNER_TEMP/profile.mobileprovision | plutil -extract UUID raw -)
PROFILE_NAME=$(security cms -D -i $RUNNER_TEMP/profile.mobileprovision | plutil -extract Name raw -)
PROFILE_BUNDLE=$(security cms -D -i $RUNNER_TEMP/profile.mobileprovision | plutil -extract Entitlements.application-identifier raw - 2>/dev/null || echo "n/a")
PROFILE_TEAM=$(security cms -D -i $RUNNER_TEMP/profile.mobileprovision | plutil -extract TeamIdentifier.0 raw -)
PROFILE_EXPIRY=$(security cms -D -i $RUNNER_TEMP/profile.mobileprovision | plutil -extract ExpirationDate raw -)
echo "DEBUG: PROFILE_UUID=$PROFILE_UUID"
echo "DEBUG: PROFILE_NAME=$PROFILE_NAME"
echo "DEBUG: PROFILE_BUNDLE=$PROFILE_BUNDLE"
echo "DEBUG: PROFILE_TEAM=$PROFILE_TEAM"
echo "DEBUG: PROFILE_EXPIRY=$PROFILE_EXPIRY"
echo "DEBUG: APPLE_TEAM_ID=$APPLE_TEAM_ID"
echo "DEBUG: profiles dir listing:"
ls ~/Library/MobileDevice/Provisioning\ Profiles/
just ios-archive "$APPLE_TEAM_ID" "$PROFILE_UUID"
run: just ios-archive
- name: Export IPA
run: just ios-export
run: |
xcodebuild -exportArchive \
-archivePath $RUNNER_TEMP/LibNovel.xcarchive \
-exportPath $RUNNER_TEMP/ipa \
-exportOptionsPlist ios/LibNovel/ExportOptions.plist
- name: Upload to TestFlight
env:
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
run: just ios-upload
run: |
xcrun altool --upload-app \
--type ios \
--file $RUNNER_TEMP/ipa/LibNovel.ipa \
--apiKey "$ASC_KEY_ID" \
--apiIssuer "$ASC_ISSUER_ID"
- name: Upload IPA artifact
uses: actions/upload-artifact@v4

View File

@@ -17,7 +17,7 @@ on:
- ".gitea/workflows/ios-release.yaml"
concurrency:
group: ios-macos-runner
group: ${{ gitea.workflow }}-${{ gitea.ref }}
cancel-in-progress: true
jobs:

View File

@@ -14,7 +14,7 @@
<string>manual</string>
<key>provisioningProfiles</key>
<dict>
<key>com.kalekber.LibNovel</key>
<key>cc.kalekber.libnovel</key>
<string>LibNovel Distribution</string>
</dict>
</dict>

View File

@@ -1,6 +1,6 @@
name: LibNovel
options:
bundleIdPrefix: com.kalekber
bundleIdPrefix: cc.kalekber
deploymentTarget:
iOS: "17.0"
xcodeVersion: "16.0"
@@ -44,16 +44,11 @@ targets:
- package: Kingfisher
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.kalekber.LibNovel
PRODUCT_BUNDLE_IDENTIFIER: cc.kalekber.libnovel
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
TARGETED_DEVICE_FAMILY: "1,2" # iPhone + iPad
GENERATE_INFOPLIST_FILE: NO
INFOPLIST_FILE: LibNovel/Resources/Info.plist
configs:
Release:
CODE_SIGN_STYLE: Manual
CODE_SIGN_IDENTITY: "Apple Distribution"
DEVELOPMENT_TEAM: GHZXC6FVMU
LibNovelTests:
type: bundle.unit-test
@@ -65,7 +60,7 @@ targets:
- target: LibNovel
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.kalekber.LibNovel.tests
PRODUCT_BUNDLE_IDENTIFIER: cc.kalekber.libnovel.tests
schemes:
LibNovel:

View File

@@ -130,20 +130,13 @@ ios-test: ios-gen ios-resolve
# Archive a signed Release build (requires valid signing identity in keychain).
# Output: {{runner_temp}}/LibNovel.xcarchive
# Typically called from CI after importing certificate + provisioning profile.
# Usage: just ios-archive <team-id> <profile-uuid>
ios-archive team_id profile_uuid: ios-gen ios-resolve
ios-archive: ios-gen ios-resolve
cd {{ios_dir}} && xcodebuild archive \
-project {{ios_scheme}}.xcodeproj \
-scheme {{ios_scheme}} \
-configuration Release \
-destination 'generic/platform=iOS' \
-clonedSourcePackagesDirPath {{ios_spm}} \
-archivePath {{runner_temp}}/LibNovel.xcarchive \
-allowProvisioningUpdates \
CODE_SIGN_STYLE=Manual \
CODE_SIGN_IDENTITY="Apple Distribution" \
DEVELOPMENT_TEAM="{{team_id}}" \
PROVISIONING_PROFILE="{{profile_uuid}}"
-archivePath {{runner_temp}}/LibNovel.xcarchive
# Export an IPA from the archive produced by ios-archive.
# Requires ios/LibNovel/ExportOptions.plist.