Skip to content

Commit

Permalink
Update ios.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowsMEMZ authored Jan 15, 2024
1 parent 2514dce commit 55a5a42
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ jobs:
- name: Replace Bundle ID
run: |
sed -i "" 's/com.darock.DarockBili.watchkitapp/com.djbx.life.agent.dat/g' DarockBili.xcodeproj/project.pbxproj
sed -i "" 's/com.darock.DarockBili/com.djbx.life.agent.dat/g' DarockBili.xcodeproj/project.pbxproj
- name: Restore Caches
uses: actions/cache/restore@v3
Expand Down Expand Up @@ -386,12 +385,27 @@ jobs:
- name: Resign IPA
env:
COMPANY_P12_NAME: ${{ secrets.COMPANY_P12_NAME }}
SIGN_SCRIPT: ${{ secrets.SIGN_SCRIPT }}
run: |
echo -n "$SIGN_SCRIPT" > sign.sh
sudo chmod a+x ./sign.sh
./sign.sh DarockBili_Release.ipa "$RUNNER_TEMP/build_pp.mobileprovision" "$COMPANY_P12_NAME"
mv DarockBili_Release.resigned.ipa resigned.ipa
CODESIGN_ALLOCATE=`xcrun --find codesign_allocate`; export CODESIGN_ALLOCATE
IPA="./DarockBili_Release.ipa"
PROVISION="$RUNNER_TEMP/build_pp.mobileprovision"
CERTIFICATE="$COMPANY_P12_NAME"
# unzip the ipa
unzip -q "$IPA"
mkdir Scache
mv Payload/*.app/Watch/*.app Scache
rm -rf Payload/*
mv Scache/*.app Payload/
# remove the signature
rm -rf Payload/*.app/_CodeSignature
# replace the provision
cp "$PROVISION" Payload/*.app/embedded.mobileprovision
plutil -convert xml1 Payload/*.app/Info.plist -o Info.plist
mv Info.plist Payload/*.app/Info.plist
# sign with the new certificate (--resource-rules has been deprecated OS X Yosemite (10.10), it can safely be removed)
/usr/bin/codesign -f -s "$CERTIFICATE" Payload/*.app
# zip it back up
zip -qr resigned.ipa Payload
- name: Upload IPA File
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 55a5a42

Please sign in to comment.