Skip to content

Commit 4d6be1d

Browse files
authored
回滚代码到动态库前版本 (#306)
* Revert "Update dylib-export.yml" This reverts commit 0197a19. * rev: reverted to 6622d4 because dylib cannot be loaded under TestFlight and App Store signing * Fix ci scripts * Fix ci scripts
1 parent 754587d commit 4d6be1d

19 files changed

+1215
-2497
lines changed

.github/workflows/dylib-export.yml .github/workflows/company-export.yml

+41-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Dylib Export Workflow
1+
name: Company IPA Export Workflow
22

33
on:
44
workflow_dispatch:
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
build:
15-
name: Build and Export Dylibs
15+
name: Build and Export Company App
1616
runs-on: macos-13
1717
permissions:
1818
checks: write
@@ -31,7 +31,7 @@ jobs:
3131
-f state='pending' \
3232
-f target_url='https://github.com/Darock-Studio/Darock-Bili/actions/runs/${{ github.run_id }}' \
3333
-f description='Building...' \
34-
-f context='Dylibs Export'
34+
-f context='Company IPA Export'
3535
3636
- name: Checkout
3737
uses: actions/checkout@v3
@@ -67,23 +67,50 @@ jobs:
6767
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
6868
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
6969
70+
- name: Replace Bundle ID
71+
run: |
72+
sed -i "" 's/com.darock.DarockBili.watchkitapp/com.djbx.life.agent.dat/g' DarockBili.xcodeproj/project.pbxproj
73+
sed -i "" 's/com.darock.DarockBili/com.djbx.life.agent.dat/g' DarockBili.xcodeproj/project.pbxproj
74+
75+
- name: Restore Caches
76+
uses: actions/cache/restore@v3
77+
with:
78+
key: ${{ runner.os }}-pr-company-export-cache-
79+
path: ~/Library/Developer/Xcode/DerivedData
80+
81+
- name: Resolve Package Dependencies
82+
run: xcodebuild -resolvePackageDependencies -project ./DarockBili.xcodeproj -scheme 'DarockBili Watch App'
83+
84+
- name: Get Current Time
85+
id: current-time
86+
run: echo "time=$(date +"%Y%m%d%H%M%S")" >> $GITHUB_OUTPUT
87+
88+
- name: Save Caches
89+
uses: actions/cache/save@v3
90+
with:
91+
key: ${{ runner.os }}-pr-company-export-cache-${{ steps.current-time.outputs.time }}
92+
path: ~/Library/Developer/Xcode/DerivedData
93+
7094
- name: Update Status Env
7195
run: echo "FIN_STATUS=failure" >> $GITHUB_ENV
7296

73-
- name: Build Dylibs
97+
- name: Archive DarockBili App
98+
env:
99+
COMPANY_PROV_UUID: ${{ secrets.COMPANY_PROV_UUID }}
100+
COMPANY_P12_NAME: ${{ secrets.COMPANY_P12_NAME }}
101+
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
102+
103+
- name: Export IPA File
74104
run: |
75-
mkdir build
76-
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 -derivedDataPath ./build
105+
xcodebuild -exportArchive -archivePath ./build.xcarchive -exportPath ./ -exportOptionsPlist ./ExportOptions/ad-hoc.plist -DVTProvisioningIsManaged=YES -DVTSkipCertificateValidityCheck=YES
106+
mv '喵哩喵哩.ipa' DarockBili_Company.ipa
107+
echo "FIN_STATUS=success" >> $GITHUB_ENV
77108
78-
- name: Resign Dylibs
79-
run: |
80-
codesign -fs B57D8PP775 build/Build/Products/Release-watchos/DarockBili.dynamic.watch.dylib
81-
82-
- name: Upload watchOS Dylib
109+
- name: Upload IPA File
83110
uses: actions/upload-artifact@v3
84111
with:
85-
name: Release-watchos
86-
path: ./build/Build/Products/Release-watchos/DarockBili.dynamic.watch.dylib
112+
name: Company IPA
113+
path: ./DarockBili_Company.ipa
87114

88115
- name: Update Check Status
89116
if: always()
@@ -95,5 +122,5 @@ jobs:
95122
/repos/${{ github.repository }}/statuses/${{ inputs.lsha }} \
96123
-f state='${{ env.FIN_STATUS }}' \
97124
-f target_url='https://github.com/Darock-Studio/Darock-Bili/actions/runs/${{ github.run_id }}' \
98-
-f context='Dylibs Export'
125+
-f context='Company IPA Export'
99126

.github/workflows/statuscheck-runner.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
echo "The comment content contains the specified text. Continuing with further actions."
2525
echo "::set-output name=shouldc::true"
2626
fi
27-
if [[ "${{ github.event.comment.body }}" != *"!Export Dylib"* ]]; then
27+
if [[ "${{ github.event.comment.body }}" != *"!Export IPA"* ]]; then
2828
echo "::set-output name=shouldtun::false"
2929
else
3030
echo "::set-output name=shouldtun::true"
@@ -70,8 +70,8 @@ jobs:
7070
with:
7171
workflow: status-check.yml
7272
inputs: '{ "psha": "${{ needs.get-head-sha.outputs.psha }}", "repository": "${{ needs.get-head-sha.outputs.repository }}", "lsha": "${{ needs.get-head-sha.outputs.lsha }}" }'
73-
call-dylib-export-workflow:
74-
name: Call Dylib Export Overflow
73+
call-company-export-workflow:
74+
name: Call Company Export Overflow
7575
needs:
7676
- get-head-sha
7777
- checkif
@@ -83,7 +83,7 @@ jobs:
8383
- name: Call
8484
uses: benc-uk/[email protected]
8585
with:
86-
workflow: dylib-export.yml
86+
workflow: company-export.yml
8787
inputs: '{ "psha": "${{ needs.get-head-sha.outputs.psha }}", "repository": "${{ needs.get-head-sha.outputs.repository }}", "lsha": "${{ needs.get-head-sha.outputs.lsha }}" }'
8888
call-tf-deploy-workflow:
8989
name: Call TestFlight Internal Deploy Overflow

0 commit comments

Comments
 (0)