diff --git a/.github/workflows/build_pipeline.yml b/.github/workflows/build_pipeline.yml index 1cd94da..f1076c7 100644 --- a/.github/workflows/build_pipeline.yml +++ b/.github/workflows/build_pipeline.yml @@ -11,9 +11,20 @@ jobs: - uses: actions/checkout@v4 - name: Select Xcode run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app - - uses: apple-actions/import-codesign-certs@v2 - with: - p12-file-base64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} - p12-password: ${{ secrets.P12_PASSWORD }} + - name: Install the Apple certificate + env: + BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} + P12_PASSWORD: ${{ secrets.P12_PASSWORD }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + run: | + CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate. + echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH + + security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + security set-keychain-settings -lut 21600 $KEYCHAIN_PATH + security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + + security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH + security list-keychain -d user -s $KEYCHAIN_PATH - name: Build & Test run: xcodebuild clean build test -project "TikTok Reporter/TikTok Reporter.xcodeproj" -scheme "TikTok Reporter" -destination "platform=iOS Simulator,name=iPhone 15 Pro,OS=17.0.1"