From 2e46954fe0d80a265235145ee247003482131b1a Mon Sep 17 00:00:00 2001 From: Adrian Castro <22133246+castdrian@users.noreply.github.com> Date: Sat, 1 Aug 2026 23:56:04 +0200 Subject: [PATCH] ci(ios): use release signing in verification --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 598c4dbc..44eeba01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,25 @@ jobs: ipa_url: ${{ steps.upload-ipa.outputs.artifact-url }} steps: - uses: actions/checkout@v4 + - name: import signing certificate + if: github.repository == 'bryanthaboi/gen1recomp' + run: | + keychain_path="$RUNNER_TEMP/gen1recomp-ci-signing.keychain-db" + ci_dir="${POKEMON_CI_DIR:-$HOME/.config/pokemon-ci}" + p12="$ci_dir/signing.p12" + passfile="$ci_dir/signing.pass" + [ -f "$p12" ] && [ -f "$passfile" ] || exit 1 + p12pw="$(cat "$passfile")" + kcpw="$(openssl rand -base64 24)" + echo "::add-mask::$kcpw" + security delete-keychain "$keychain_path" 2>/dev/null || true + security create-keychain -p "$kcpw" "$keychain_path" + security set-keychain-settings "$keychain_path" + security unlock-keychain -p "$kcpw" "$keychain_path" + security import "$p12" -P "$p12pw" -k "$keychain_path" -T /usr/bin/codesign -T /usr/bin/security + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$kcpw" "$keychain_path" >/dev/null + existing="$(security list-keychains -d user | sed -e 's/^[[:space:]]*//' -e 's/"//g')" + security list-keychains -d user -s "$keychain_path" $existing - name: install xcbeautify run: brew list xcbeautify >/dev/null 2>&1 || brew install xcbeautify - name: build iOS release @@ -80,6 +99,9 @@ jobs: path: dist/ios/gen1recomp.ipa if-no-files-found: error retention-days: 7 + - name: clean up signing keychain + if: ${{ always() && github.repository == 'bryanthaboi/gen1recomp' }} + run: security delete-keychain "$RUNNER_TEMP/gen1recomp-ci-signing.keychain-db" 2>/dev/null || true ios-build-comment: name: iOS artifact comment