Compare commits
12 Commits
ios-v1.0.1
...
ios-v1.0.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc3bc3ebf2 | ||
|
|
e9d7293d37 | ||
|
|
410af8f236 | ||
|
|
264c00c765 | ||
|
|
e4c72011eb | ||
|
|
6365b14ece | ||
|
|
7da5582075 | ||
|
|
dae841e317 | ||
|
|
16b2bfffa6 | ||
|
|
57be674f44 | ||
|
|
93390fab64 | ||
|
|
072517135f |
@@ -28,12 +28,28 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.2'
|
||||
bundler-cache: true
|
||||
working-directory: ios/LibNovel
|
||||
- name: Set up Ruby with rbenv
|
||||
run: |
|
||||
# Install rbenv and ruby-build if not already installed
|
||||
brew install rbenv ruby-build || true
|
||||
|
||||
# Install Ruby 3.2.2
|
||||
rbenv install 3.2.2 --skip-existing
|
||||
rbenv global 3.2.2
|
||||
|
||||
# Add rbenv to PATH for subsequent steps
|
||||
echo "$(rbenv root)/shims" >> $GITHUB_PATH
|
||||
|
||||
# Verify Ruby version
|
||||
eval "$(rbenv init -)"
|
||||
ruby --version
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ios/LibNovel
|
||||
run: |
|
||||
eval "$(rbenv init -)"
|
||||
gem install bundler
|
||||
bundle install
|
||||
|
||||
- name: Import signing certificate
|
||||
env:
|
||||
@@ -60,18 +76,29 @@ jobs:
|
||||
PP_PATH=$RUNNER_TEMP/profile.mobileprovision
|
||||
echo "$PROFILE_BASE64" | base64 --decode > $PP_PATH
|
||||
UUID=$(security cms -D -i "$PP_PATH" | plutil -extract UUID raw -)
|
||||
PROFILE_NAME=$(security cms -D -i "$PP_PATH" | plutil -extract Name raw -)
|
||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles/$UUID.mobileprovision
|
||||
echo "Installed profile: $PROFILE_NAME (UUID: $UUID)"
|
||||
echo "PROFILE_NAME=$PROFILE_NAME" >> $GITHUB_ENV
|
||||
echo "PROFILE_UUID=$UUID" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and upload to TestFlight
|
||||
env:
|
||||
USER: runner
|
||||
LC_ALL: en_US.UTF-8
|
||||
LANG: en_US.UTF-8
|
||||
APPLE_KEY_ID: ${{ secrets.ASC_KEY_ID }}
|
||||
APPLE_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
|
||||
APPLE_KEY_CONTENT: ${{ secrets.ASC_PRIVATE_KEY }}
|
||||
BUILD_NUMBER: ${{ gitea.run_number }}
|
||||
PROVISIONING_PROFILE_NAME: LibNovel Distribution
|
||||
working-directory: ios/LibNovel
|
||||
run: bundle exec fastlane beta
|
||||
run: |
|
||||
eval "$(rbenv init -)"
|
||||
echo "Using provisioning profile: $PROFILE_NAME (UUID: $PROFILE_UUID)"
|
||||
export PROVISIONING_PROFILE_NAME="$PROFILE_NAME"
|
||||
export PROVISIONING_PROFILE_UUID="$PROFILE_UUID"
|
||||
bundle exec fastlane beta
|
||||
|
||||
- name: Cleanup keychain
|
||||
if: always()
|
||||
|
||||
@@ -3,8 +3,8 @@ default_platform(:ios)
|
||||
platform :ios do
|
||||
desc "Build and upload to TestFlight"
|
||||
lane :beta do
|
||||
# Generate Xcode project from project.yml
|
||||
sh("xcodegen generate --spec project.yml --project .")
|
||||
# Generate Xcode project from project.yml (one level up from fastlane/)
|
||||
sh("cd .. && xcodegen generate --spec project.yml --project .")
|
||||
|
||||
# Set build number from CI run number (passed as env var)
|
||||
increment_build_number(
|
||||
@@ -12,15 +12,30 @@ platform :ios do
|
||||
xcodeproj: "LibNovel.xcodeproj"
|
||||
)
|
||||
|
||||
# Build the app
|
||||
# Enable manual code signing with specific provisioning profile UUID
|
||||
# Using UUID instead of name because Xcode expects TEAM_ID/Name format for names
|
||||
update_code_signing_settings(
|
||||
use_automatic_signing: false,
|
||||
team_id: "GHZXC6FVMU",
|
||||
targets: ["LibNovel"],
|
||||
path: "LibNovel.xcodeproj",
|
||||
profile_uuid: ENV["PROVISIONING_PROFILE_UUID"] || "af592c3a-f60b-4ac1-a14f-30b8a206017f",
|
||||
code_sign_identity: "Apple Distribution"
|
||||
)
|
||||
|
||||
# Build the app with manual signing
|
||||
build_app(
|
||||
scheme: "LibNovel",
|
||||
export_method: "app-store",
|
||||
clean: true,
|
||||
configuration: "Release",
|
||||
export_options: {
|
||||
method: "app-store",
|
||||
teamID: "GHZXC6FVMU",
|
||||
provisioningProfiles: {
|
||||
"com.kalekber.LibNovel" => ENV["PROVISIONING_PROFILE_NAME"] || "LibNovel Distribution"
|
||||
}
|
||||
},
|
||||
signingStyle: "manual"
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
32
ios/LibNovel/test-build.sh
Executable file
32
ios/LibNovel/test-build.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Test script for local iOS build iteration
|
||||
# Run from ios/LibNovel directory
|
||||
|
||||
echo "=== Generating Xcode project ==="
|
||||
xcodegen generate --spec project.yml --project .
|
||||
|
||||
echo ""
|
||||
echo "=== Listing available provisioning profiles ==="
|
||||
ls -la ~/Library/MobileDevice/Provisioning\ Profiles/ || echo "No profiles found"
|
||||
|
||||
echo ""
|
||||
echo "=== Listing available signing identities ==="
|
||||
security find-identity -v -p codesigning
|
||||
|
||||
echo ""
|
||||
echo "=== Attempting archive build ==="
|
||||
xcodebuild archive \
|
||||
-project LibNovel.xcodeproj \
|
||||
-scheme LibNovel \
|
||||
-configuration Release \
|
||||
-destination 'generic/platform=iOS' \
|
||||
-archivePath ./build/LibNovel.xcarchive \
|
||||
-allowProvisioningUpdates \
|
||||
CODE_SIGN_STYLE=Manual \
|
||||
CODE_SIGN_IDENTITY="Apple Distribution" \
|
||||
DEVELOPMENT_TEAM="GHZXC6FVMU"
|
||||
|
||||
echo ""
|
||||
echo "=== Build succeeded! ==="
|
||||
Reference in New Issue
Block a user