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

Fix GitHub Actions Workflow to Correctly Convert IPA to DEB #36

Closed
wants to merge 5 commits into from
Closed
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
50 changes: 37 additions & 13 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,52 @@ name: Run
on:
workflow_dispatch:
inputs:
deb:
description: "Direct URL to deb file"
ipa:
description: "Direct URL to IPA file"
required: true

jobs:
run:
runs-on: ubuntu-latest

steps:
- name: Convert deb to IPA
- name: Set up workspace
run: |
curl -L -o ${{ github.workspace }}/app.deb "${{ github.event.inputs.deb }}"
dpkg-deb -X ${{ github.workspace }}/app.deb ${{ github.workspace }}/app
mkdir -p ${{ github.workspace }}/deb-package/DEBIAN
mkdir -p ${{ github.workspace }}/deb-package/Applications

mkdir -p ${{ github.workspace }}/ipa/Payload
cp -R ${{ github.workspace }}/app/Applications/* ${{ github.workspace }}/ipa/Payload

cd ${{ github.workspace }}/ipa
zip -r ${{ github.workspace }}/App.ipa .
- name: Download IPA
run: |
curl -L -o ${{ github.workspace }}/deb-package/Applications/App.ipa "${{ github.event.inputs.ipa }}"

- name: Create DEBIAN control file
run: |
cat <<EOF > ${{ github.workspace }}/deb-package/DEBIAN/control
Package: your-app-name
Version: 1.0.0
Section: base
Priority: optional
Architecture: all
Maintainer: Your Name <[email protected]>
Description: Description of your app.
EOF

- name: (Optional) Add post-install scripts
run: |
cat <<EOF > ${{ github.workspace }}/deb-package/DEBIAN/postinst
#!/bin/bash
echo "Post-installation script running"
# Example: Change permissions of the IPA
chmod 755 /Applications/App.ipa
EOF
chmod 755 ${{ github.workspace }}/deb-package/DEBIAN/postinst

- name: Build DEB Package
run: |
dpkg-deb --build ${{ github.workspace }}/deb-package ${{ github.workspace }}/App.deb

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