Skip to content

Commit 81f41ef

Browse files
authored
Update jfj.yml
1 parent cfbec1b commit 81f41ef

1 file changed

Lines changed: 51 additions & 20 deletions

File tree

.github/workflows/jfj.yml

Lines changed: 51 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,58 +15,89 @@ jobs:
1515
- name: Checkout Repository
1616
uses: actions/checkout@v4
1717

18-
# Step 2: Install dependencies (zsign and other tools)
18+
# Step 2: Debug directory structure
19+
- name: List Directory Structure
20+
run: |
21+
echo "Current working directory: $(pwd)"
22+
echo "Listing all files in repository:"
23+
find . -type f -ls
24+
echo "Checking for Priv folder:"
25+
find . -type d -name "Priv" || echo "Priv folder not found"
26+
27+
# Step 3: Install dependencies (zsign and other tools)
1928
- name: Install zsign and Dependencies
2029
run: |
2130
sudo apt-get update
22-
sudo apt-get install -y curl unzip
23-
# Download and install zsign
24-
curl -L -o zsign https://github.com/zhlynn/zsign/releases/latest/download/zsign_linux_x86_64
31+
sudo apt-get install -y curl unzip libplist-utils
32+
# Download a specific version of zsign to ensure compatibility
33+
curl -L -o zsign https://github.com/zhlynn/zsign/releases/download/v0.2.2/zsign_linux_x86_64
34+
# Verify download
35+
if [ ! -s zsign ]; then
36+
echo "Error: zsign download failed or file is empty"
37+
exit 1
38+
fi
2539
chmod +x zsign
26-
sudo mv zsign /usr/local/bin/
40+
sudo mv zsign /usr/local/bin/zsign
41+
# Verify zsign is executable
42+
if ! /usr/local/bin/zsign -h >/dev/null 2>&1; then
43+
echo "Error: zsign is not executable or invalid"
44+
exit 1
45+
fi
46+
echo "zsign installed successfully"
47+
zsign -h
2748
28-
# Step 3: Download the IPA file from Filebin
49+
# Step 4: Download the IPA file from Filebin
2950
- name: Download IPA File
3051
run: |
3152
curl -L -o DokkanSparking_Release_5.25.3.ipa https://filebin.net/mwoj4adth3toumo1/DokkanSparking_Release_5.25.3.ipa
53+
if [ ! -f DokkanSparking_Release_5.25.3.ipa ]; then
54+
echo "Error: IPA download failed"
55+
exit 1
56+
fi
3257
ls -lh DokkanSparking_Release_5.25.3.ipa
3358
34-
# Step 4: Find certificate and provisioning profile
59+
# Step 5: Find certificate and provisioning profile
3560
- name: Locate Certificate and Provisioning Profile
3661
id: find-files
3762
run: |
38-
P12_FILE=$(find Priv -name "*.p12" | head -n 1)
39-
MOBILEPROVISION_FILE=$(find Priv -name "*.mobileprovision" | head -n 1)
63+
# Search recursively for Priv folder
64+
P12_FILE=$(find . -type f -name "*.p12" -path "*/Priv/*" | head -n 1)
65+
MOBILEPROVISION_FILE=$(find . -type f -name "*.mobileprovision" -path "*/Priv/*" | head -n 1)
4066
if [ -z "$P12_FILE" ] || [ -z "$MOBILEPROVISION_FILE" ]; then
4167
echo "Error: Could not find .p12 or .mobileprovision file in Priv folder"
68+
find . -type f -name "*.p12" -o -name "*.mobileprovision"
4269
exit 1
4370
fi
4471
echo "p12_file=$P12_FILE" >> $GITHUB_OUTPUT
4572
echo "mobileprovision_file=$MOBILEPROVISION_FILE" >> $GITHUB_OUTPUT
4673
echo "Found .p12: $P12_FILE"
4774
echo "Found .mobileprovision: $MOBILEPROVISION_FILE"
4875
49-
# Step 5: Sign the IPA with zsign
76+
# Step 6: Sign the IPA with zsign
5077
- name: Sign IPA with zsign
5178
run: |
52-
zsign -k "${{ steps.find-files.outputs.p12_file }}" \
53-
-p "1234" \
54-
-m "${{ steps.find-files.outputs.mobileprovision_file }}" \
55-
-o signed_DokkanSparking_Release_5.25.3.ipa \
56-
DokkanSparking_Release_5.25.3.ipa
79+
/usr/local/bin/zsign -k "${{ steps.find-files.outputs.p12_file }}" \
80+
-p "1234" \
81+
-m "${{ steps.find-files.outputs.mobileprovision_file }}" \
82+
-o signed_DokkanSparking_Release_5.25.3.ipa \
83+
DokkanSparking_Release_5.25.3.ipa
5784
if [ ! -f signed_DokkanSparking_Release_5.25.3.ipa ]; then
5885
echo "Error: Signing failed, signed IPA not found"
5986
exit 1
6087
fi
6188
echo "Signed IPA created: signed_DokkanSparking_Release_5.25.3.ipa"
89+
ls -lh signed_DokkanSparking_Release_5.25.3.ipa
6290
63-
# Step 6: Create manifest for OTA installation
91+
# Step 7: Create manifest for OTA installation
6492
- name: Create Manifest for OTA Installation
6593
run: |
66-
# Install PlistBuddy for bundle ID extraction
67-
sudo apt-get install -y libplist-utils
94+
# Extract bundle ID from mobileprovision
6895
/usr/libexec/PlistBuddy -c "Print :Entitlements:application-identifier" "${{ steps.find-files.outputs.mobileprovision_file }}" > temp_bundle_id.txt
6996
BUNDLE_ID=$(cat temp_bundle_id.txt | cut -d'.' -f2-)
97+
if [ -z "$BUNDLE_ID" ]; then
98+
echo "Error: Could not extract bundle ID"
99+
exit 1
100+
fi
70101
echo "Bundle ID: $BUNDLE_ID"
71102
72103
# Create manifest.plist
@@ -105,7 +136,7 @@ jobs:
105136
EOF
106137
cat manifest.plist
107138
108-
# Step 7: Upload signed IPA and manifest to GitHub Releases
139+
# Step 8: Upload signed IPA and manifest to GitHub Releases
109140
- name: Upload to GitHub Releases
110141
uses: softprops/action-gh-release@v2
111142
with:
@@ -119,7 +150,7 @@ jobs:
119150
env:
120151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
121152

122-
# Step 8: Generate and output OTA installation link
153+
# Step 9: Generate and output OTA installation link
123154
- name: Output OTA Installation Link
124155
run: |
125156
INSTALL_LINK="itms-services://?action=download-manifest&url=https://github.com/${{ github.repository }}/releases/download/v${{ github.run_id }}/manifest.plist"

0 commit comments

Comments
 (0)