diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml index 2487042e..e0300138 100644 --- a/.github/workflows/ios_builds.yml +++ b/.github/workflows/ios_builds.yml @@ -27,6 +27,35 @@ jobs: - name: Install dependencies uses: ./.github/actions/install-deps + # Set up code signing certificate + - name: Set up code signing certificate + env: + P12_BASE64: ${{ secrets.IOS_P12_BASE64 }} + P12_PASSWORD: ${{ secrets.IOS_P12_PASSWORD }} + run: | + # Create a temporary keychain + security create-keychain -p "" build.keychain + security set-keychain-settings -lut 21600 build.keychain + security unlock-keychain -p "" build.keychain + security list-keychains -s build.keychain + + # Decode and import the .p12 certificate + echo "$P12_BASE64" | base64 --decode > certificate.p12 + security import certificate.p12 -k build.keychain -P "$P12_PASSWORD" -T /usr/bin/codesign + + # Set the keychain as default + security default-keychain -s build.keychain + security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain + + # Set up provisioning profile + - name: Set up provisioning profile + env: + PROFILE_BASE64: ${{ secrets.PROFILE_BASE64 }} + run: | + mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles + echo "$PROFILE_BASE64" | base64 --decode > profile.mobileprovision + mv profile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/ + # Build section - name: Cargo install run: cargo run -- install --platforms ios