Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update run.yml #33

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,44 @@ jobs:
steps:
- name: Convert deb to IPA
run: |
curl -L -o ${{ github.workspace }}/app.deb "${{ github.event.inputs.deb }}"
# Extract the filename from the deb URL
deb_url="${{ github.event.inputs.deb }}"
deb_filename=$(basename "$deb_url" .deb)

# Download the .deb file
curl -L -o ${{ github.workspace }}/app.deb "$deb_url"

# Extract the contents of the .deb file
dpkg-deb -X ${{ github.workspace }}/app.deb ${{ github.workspace }}/app

# Create the IPA Payload directory
mkdir -p ${{ github.workspace }}/ipa/Payload
cp -R ${{ github.workspace }}/app/Applications/* ${{ github.workspace }}/ipa/Payload

# Check if the extracted files are in var/jb/Applications or Library
if [ -d "${{ github.workspace }}/app/var/jb/Applications" ]; then
cp -R ${{ github.workspace }}/app/var/jb/Applications/* ${{ github.workspace }}/ipa/Payload
elif [ -d "${{ github.workspace }}/app/var/jb/Library/MobileSubstrate/DynamicLibraries" ]; then
mkdir -p ${{ github.workspace }}/ipa/Payload/Library/MobileSubstrate/DynamicLibraries
cp -R ${{ github.workspace }}/app/var/jb/Library/MobileSubstrate/DynamicLibraries/* ${{ github.workspace }}/ipa/Payload/Library/MobileSubstrate/DynamicLibraries
else
echo "No valid application files found in expected directories."
exit 1
fi

# Create the IPA file using the .deb filename
cd ${{ github.workspace }}/ipa
zip -r ${{ github.workspace }}/App.ipa .
zip -r "${deb_filename}.ipa" Payload

# Ensure the IPA file exists
if [ -f "${deb_filename}.ipa" ]; then
echo "IPA created successfully as ${deb_filename}.ipa!"
else
echo "IPA creation failed."
exit 1
fi

- name: Upload IPA
uses: actions/upload-artifact@v4
with:
name: App
path: ${{ github.workspace }}/App.ipa
path: ${{ github.workspace }}/ipa/*.ipa