Skip to content

Commit

Permalink
Fix Dylib Codesign for CI runs (#304)
Browse files Browse the repository at this point in the history
* Update DarockBili.dynamic.xcscheme

* Update DarockBili.dynamic.watch.xcscheme

* Update ci_post_clone.sh

* Delete ci_scripts/ci_post_clone.sh

* Delete ci_scripts/ci_post_xcodebuild.sh

* Update DarockBili.dynamic.xcscheme

* Update DarockBili.dynamic.watch.xcscheme

* Update and rename company-export.yml to dylib-export.yml

* Update statuscheck-runner.yml
  • Loading branch information
WindowsMEMZ authored Mar 5, 2024
1 parent cee64b6 commit 8652388
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 58 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Company IPA Export Workflow
name: Dylib Export Workflow

on:
workflow_dispatch:
Expand All @@ -12,7 +12,7 @@ on:

jobs:
build:
name: Build and Export Company App
name: Build and Export Dylibs
runs-on: macos-13
permissions:
checks: write
Expand All @@ -31,7 +31,7 @@ jobs:
-f state='pending' \
-f target_url='https://github.com/Darock-Studio/Darock-Bili/actions/runs/${{ github.run_id }}' \
-f description='Building...' \
-f context='Company IPA Export'
-f context='Dylibs Export'
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -67,15 +67,10 @@ jobs:
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- 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
with:
key: ${{ runner.os }}-pr-company-export-cache-
key: ${{ runner.os }}-pr-dylib-export-cache-
path: ~/Library/Developer/Xcode/DerivedData

- name: Resolve Package Dependencies
Expand All @@ -88,29 +83,20 @@ jobs:
- name: Save Caches
uses: actions/cache/save@v3
with:
key: ${{ runner.os }}-pr-company-export-cache-${{ steps.current-time.outputs.time }}
key: ${{ runner.os }}-pr-dylib-export-cache-${{ steps.current-time.outputs.time }}
path: ~/Library/Developer/Xcode/DerivedData

- name: Update Status Env
run: echo "FIN_STATUS=failure" >> $GITHUB_ENV

- name: Archive DarockBili App
env:
COMPANY_PROV_UUID: ${{ secrets.COMPANY_PROV_UUID }}
COMPANY_P12_NAME: ${{ secrets.COMPANY_P12_NAME }}
run: xcodebuild archive -project ./DarockBili.xcodeproj -scheme 'DarockBili Watch App' -archivePath ./build.xcarchive -IDEPostProgressNotifications=YES CODE_SIGN_IDENTITY=- AD_HOC_CODE_SIGNING_ALLOWED=YES CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=H5SM6ZV38F COMPILER_INDEX_STORE_ENABLE=NO -quiet

- name: Export IPA File
run: |
xcodebuild -exportArchive -archivePath ./build.xcarchive -exportPath ./ -exportOptionsPlist ./ExportOptions/ad-hoc.plist -DVTProvisioningIsManaged=YES -DVTSkipCertificateValidityCheck=YES
mv '喵哩喵哩.ipa' DarockBili_Company.ipa
echo "FIN_STATUS=success" >> $GITHUB_ENV
- name: Upload IPA File
- name: Build Dylibs
run: xcodebuild build -project ./DarockBili.xcodeproj -scheme 'DarockBili.dynamic.watch' -destination generic/platform=watchOS -IDEPostProgressNotifications=YES CODE_SIGN_IDENTITY=- AD_HOC_CODE_SIGNING_ALLOWED=YES CODE_SIGN_STYLE=Automatic COMPILER_INDEX_STORE_ENABLE=NO -quiet

- name: Upload watchOS Dylib
uses: actions/upload-artifact@v3
with:
name: Company IPA
path: ./DarockBili_Company.ipa
name: Release-watchos
path: ~/Library/Developer/Xcode/DerivedData/Build/Products/Release-watchos/DarockBili.dynamic.watch.dylib

- name: Update Check Status
if: always()
Expand All @@ -122,5 +108,5 @@ jobs:
/repos/${{ github.repository }}/statuses/${{ inputs.lsha }} \
-f state='${{ env.FIN_STATUS }}' \
-f target_url='https://github.com/Darock-Studio/Darock-Bili/actions/runs/${{ github.run_id }}' \
-f context='Company IPA Export'
-f context='Dylibs Export'
15 changes: 0 additions & 15 deletions ci_scripts/ci_post_clone.sh

This file was deleted.

17 changes: 0 additions & 17 deletions ci_scripts/ci_post_xcodebuild.sh

This file was deleted.

0 comments on commit 8652388

Please sign in to comment.