-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
276996a
commit 20a5aa7
Showing
3 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Build iOS App | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/[email protected] | ||
with: | ||
ruby-version: '3.3' | ||
|
||
- name: Install CocoaPods | ||
working-directory: ios/App | ||
run: | | ||
npm i | ||
gem install cocoapods | ||
pod install | ||
- name: Import Signing Certificate | ||
env: | ||
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} | ||
MACOS_KEYCHAIN_PASSWORD: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }} | ||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} | ||
run: | | ||
# Create the keychain | ||
security create-keychain -p "$MACOS_KEYCHAIN_PASSWORD" build.keychain | ||
# Unlock the keychain | ||
security unlock-keychain -p "$MACOS_KEYCHAIN_PASSWORD" build.keychain | ||
# Set the keychain as the default | ||
security list-keychains -s build.keychain | ||
# Import the certificate directly from the environment variable | ||
security import <(echo "$MACOS_CERTIFICATE" | base64 --decode) \ | ||
-f pkcs12 \ | ||
-k build.keychain \ | ||
-P "$MACOS_CERTIFICATE_PWD" \ | ||
-T /usr/bin/codesign || { echo "Import failed"; exit 1; } | ||
# Set the key partition list | ||
security set-key-partition-list -S apple-tool:,apple: -s -k "$MACOS_KEYCHAIN_PASSWORD" build.keychain | ||
- name: Debug Provisioning Profiles | ||
run: | | ||
# Create the directory if it does not exist | ||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | ||
# List the contents of the provisioning profiles directory | ||
echo "Provisioning Profiles Directory Contents:" | ||
ls ~/Library/MobileDevice/Provisioning\ Profiles | ||
# Print the expected provisioning profile path | ||
echo "Expected path for the provisioning profile:" | ||
echo "~/Library/MobileDevice/Provisioning Profiles/your_provisioning_profile.mobileprovision" | ||
- name: Download and Install Provisioning Profile | ||
run: | | ||
echo "${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}" | base64 --decode > ~/Library/MobileDevice/Provisioning\ Profiles/your_provisioning_profile.mobileprovision | ||
- name: Build the iOS App | ||
working-directory: ios/App | ||
run: | | ||
xcodebuild -workspace App.xcworkspace -scheme App -sdk iphoneos -configuration Release archive -archivePath ${{ github.workspace }}/build/App.xcarchive DEVELOPMENT_TEAM="${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}" -allowProvisioningUpdates | ||
- name: Export .ipa File | ||
working-directory: ios/App | ||
run: | | ||
xcodebuild -exportArchive -archivePath ${{ github.workspace }}/build/App.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath ${{ github.workspace }}/build | ||
- name: Upload .ipa to Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: App.ipa | ||
path: ${{ github.workspace }}/build/*.ipa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>method</key> | ||
<string>development</string> | ||
<key>teamID</key> | ||
<string>${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}</string> | ||
<key>provisioningProfiles</key> | ||
<dict> | ||
<key>com.Satellite.Uplink</key> | ||
<string>App</string> | ||
</dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ SPEC CHECKSUMS: | |
|
||
PODFILE CHECKSUM: d641883bb20843cf484024fa8ccc257a419b4040 | ||
|
||
COCOAPODS: 1.15.2 | ||
COCOAPODS: 1.16.1 |