Hi,
Until now, I deployed iOS apps using xcode running on mac. I need to publish my application using GitHubActions.
I used this guide:
My workflow CI.yml file:
name: Build
on:
push:
branches:
- main
jobs:
install-and-test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install yarn dependencies
run: |
yarn install
- name: Install pod dependencies
run: |
cd ios && pod install
- name: bundle
run: |
yarn react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios
- name: Install the Apple certificate and provisioning profile
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
echo "$P12_PASSWORD"
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: buildArchive
run: |
xcodebuild -project ios/GitHubActions.xcodeproj -scheme GitHubActions -sdk iphoneos -configuration Release archive PROVISIONING_PROFILE="XXXXXXXXXX" -archivePath ios/GitHubActions.xcarchive -allowProvisioningUpdates
I added appropriate entries in github secrets
The error I get is:
error: There are no accounts registered with Xcode. Add your developer account to Xcode (in target 'GitHubActions' from project 'GitHubActions')
error: No profiles for 'com.githubactions' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.githubactions'. (in target 'GitHubActions' from project 'GitHubActions')
Error: Process completed with exit code 65.
I used the github tutorial, so I don’t know why this error occurs. Is there really a need to login to xcode with xcode or the steps I just followed are enough? what is causing this error and how can i fix it?