Skip to content

Commit

Permalink
routine cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Randomblock1 committed Sep 12, 2021
1 parent f2a016b commit 1ea65f9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# theos-action

_Use Theos in your GitHub Actions to build iOS tweaks, even without owning a Mac._

### Wait, what's Theos?
## Wait, what's Theos?

[Theos](https://github.com/theos/theos) is a cross-platform building suite for iOS and MacOS. It's mainly used for developing and compiling jailbroken iOS tweaks for the iPhone/iPad.

## What's new

v1: Initial release. Only MacOS support, and only supports 1 SDK repo (although you can just run it a few times or do it yourself). It works, but it is probably not very efficient.

## Usage

MAKE SURE YOU'RE USING THIS WITH A MACOS RUNNER!!! Linux support may be added if there is enough demand, but for now only Mac is supported.

```
Expand All @@ -26,12 +30,15 @@ MAKE SURE YOU'RE USING THIS WITH A MACOS RUNNER!!! Linux support may be added if
```

## Example

See [this workflow](https://github.com/Randomblock1/FleetsBGone/blob/master/.github/workflows/build.yml) as an example of how to use this. It configures a custom SDK repository, uses GitHub Actions cache to speed up downloads (Theos and the SDKs are rarely updated), builds a tweak, and packages it up using GitHub Artifacts.

That workflow should work out-of-the-box for most Theos projects. Some tweaking may be required, but it's basically just copy-paste.

## Issues

Feel free to submit any issues or pull requests.

## License

This project is released under the [MIT License](LICENSE)
26 changes: 14 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ inputs:
required: false
default: theos
theos-src:
description: 'Where to fetch Theos from (github URL)'
description: 'Where to clone Theos itself from (git URL)'
required: false
default: 'https://github.com/theos/theos'
theos-sdks:
description: 'Where to get the SDKs from (github URL)'
description: 'Where to clone the iOS SDKs from (git URL)'
required: false
default: 'https://github.com/theos/sdks'
runs:
Expand All @@ -29,22 +29,24 @@ runs:
shell: bash
run: |
if [ ! -d "${{ github.workspace }}/${{ inputs.theos-dir }}" ]; then
git clone ${{ inputs.theos-src }} ${{ github.workspace }}/${{ inputs.theos-dir }} --recursive
echo "Theos successfully obtained!"
else echo "Theos already cached, skipping..."
git clone ${{ inputs.theos-src }} ${{ github.workspace }}/${{ inputs.theos-dir }} --recursive
echo "Theos successfully obtained!"
else
echo "Theos already cached, skipping..."
fi
- name: get sdks
shell: bash
run: |
if [ ! -d "${{ github.workspace }}/${{ inputs.theos-dir }}/sdks" ]; then
cd ${{ github.workspace }}/${{ inputs.theos-dir }}/sdks
curl -sLO ${{ inputs.theos-sdks }}/archive/master.zip
TMP=$(mktemp -d)
7z x master.zip -o$TMP
mv $TMP/*-master/*.sdk $THEOS/sdks
rm -r master.zip $TMP
else echo "Theos SDKs already cached, skipping..."
cd ${{ github.workspace }}/${{ inputs.theos-dir }}/sdks
curl -sLO ${{ inputs.theos-sdks }}/archive/master.zip
TMP=$(mktemp -d)
7z x master.zip -o$TMP
mv $TMP/*-master/*.sdk $THEOS/sdks
rm -r master.zip $TMP
else
echo "Theos SDKs already cached, skipping..."
fi
branding:
Expand Down

0 comments on commit 1ea65f9

Please sign in to comment.