Skip to content

Commit

Permalink
Merge branch 'qnblackcat:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
therealFoxster authored Jan 28, 2024
2 parents 1459b08 + 6d579dc commit 61e55e1
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/buildapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ on:
required: true
type: string
decrypted_youtube_url:
description: "The direct URL to the decrypted YouTube ipa"
default: ""
required: true
type: string
youtube_version:
description: "The version of YouTube"
description: "Direct URL to the decrypted YouTube ipa. The version of YouTube will be detected automatically."
default: ""
required: true
type: string
Expand Down Expand Up @@ -55,7 +50,7 @@ jobs:

steps:
- name: Checkout Main
uses: actions/checkout@v3.2.0
uses: actions/checkout@v4.1.1
with:
path: main
submodules: recursive
Expand All @@ -67,7 +62,7 @@ jobs:
run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH

- name: Setup Theos
uses: actions/checkout@v3.2.0
uses: actions/checkout@v4.1.1
with:
repository: theos/theos
ref: master
Expand All @@ -76,7 +71,7 @@ jobs:

- name: Caching
id: SDK
uses: actions/cache@v3.2.0
uses: actions/cache@v4.0.0
env:
cache-name: iOS-16.5-SDK
with:
Expand All @@ -94,7 +89,7 @@ jobs:
THEOS: ${{ github.workspace }}/theos

- name: Setup Theos Jailed
uses: actions/checkout@v3.2.0
uses: actions/checkout@v4.1.1
with:
repository: qnblackcat/theos-jailed
ref: master
Expand All @@ -107,13 +102,20 @@ jobs:
env:
THEOS: ${{ github.workspace }}/theos

- name: Download YouTube iPA
- name: Prepare YouTube iPA
id: prepare_youtube
run: |
wget "$YOUTUBE_URL" --no-verbose -O main/YouTube.ipa && echo -e "==> \033[1mYouTube v${{ inputs.youtube_version }} downloaded! \033[0m"
wget "$YOUTUBE_URL" --no-verbose -O main/YouTube.ipa
cd ${{ github.workspace }}/main
mv YouTube.ipa YouTube.zip
unzip -q YouTube.zip
youtube_version=$(defaults read "$(pwd)/Payload/YouTube.app/Info" CFBundleVersion)
echo "==> YouTube v$youtube_version downloaded!"
sed -i '' "17s#.*#YOUTUBE_VERSION = ${youtube_version}#g" Makefile
echo "youtube_version=${youtube_version}" >> $GITHUB_OUTPUT
env:
THEOS: ${{ github.workspace }}/theos
YOUTUBE_VERSION: ${{ inputs.youtube_version }}
YOUTUBE_URL: ${{ inputs.decrypted_youtube_url }}

- name: Fix compiling & Build Package
Expand All @@ -122,37 +124,35 @@ jobs:
cd ${{ github.workspace }}/main
sed -i '' "27s#.*#BUNDLE_ID = ${{ env.BUNDLE_ID }}#g" Makefile
sed -i '' "26s#.*#DISPLAY_NAME = ${{ env.APP_NAME }}#g" Makefile
make package THEOS_PACKAGE_SCHEME=rootless IPA=YouTube.ipa FINALPACKAGE=1
(mv "packages/$(ls -t packages | head -n1)" "packages/uYouPlus_${{ env.YOUTUBE_VERSION }}_${{ env.UYOU_VERSION }}.ipa")
make package THEOS_PACKAGE_SCHEME=rootless IPA=Payload/YouTube.app FINALPACKAGE=1
echo "package=$(ls -t packages | head -n1)" >>$GITHUB_OUTPUT
echo -e "==> \033[1mSHASUM256: $(shasum -a 256 packages/*.ipa | cut -f1 -d' ')\033[0m"
echo -e "==> \033[1mBundle ID: ${{ env.BUNDLE_ID }}\033[0m"
env:
THEOS: ${{ github.workspace }}/theos
UYOU_VERSION: ${{ inputs.uyou_version }}
YOUTUBE_VERSION: ${{ inputs.youtube_version }}
BUNDLE_ID: ${{ inputs.bundle_id }}
APP_NAME: ${{ inputs.app_name }}

- name: Upload Artifact
if: ${{ inputs.upload_artifact }}
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4.3.0
env:
UYOU_VERSION: ${{ inputs.uyou_version }}
YOUTUBE_VERSION: ${{ inputs.youtube_version }}
YOUTUBE_VERSION: ${{ steps.prepare_youtube.outputs.youtube_version }}
with:
name: uYouPlus_${{ env.YOUTUBE_VERSION }}_${{ env.UYOU_VERSION }}
path: ${{ github.workspace }}/main/packages/${{ steps.build_package.outputs.package }}
if-no-files-found: error

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v0.1.15
uses: qnblackcat/action-gh-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UYOU_VERSION: ${{ inputs.uyou_version }}
YOUTUBE_VERSION: ${{ inputs.youtube_version }}
YOUTUBE_VERSION: ${{ steps.prepare_youtube.outputs.youtube_version }}
DRAFT: ${{ inputs.create_release }}
with:
tag_name: v${{ env.YOUTUBE_VERSION }}-${{ env.UYOU_VERSION }}-(${{ github.run_number }})
Expand Down

0 comments on commit 61e55e1

Please sign in to comment.