From 5d23b0273f7b34e22debc17d895fbc742ca44b64 Mon Sep 17 00:00:00 2001 From: Macley <26381427+Macleykun@users.noreply.github.com> Date: Sun, 17 Mar 2024 22:42:03 +0100 Subject: [PATCH] Use yt_version variable in build process --- .github/workflows/buildapp.yml | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/.github/workflows/buildapp.yml b/.github/workflows/buildapp.yml index cf4dc74..973f2a7 100644 --- a/.github/workflows/buildapp.yml +++ b/.github/workflows/buildapp.yml @@ -11,11 +11,6 @@ on: default: "" required: true type: string - youtube_version: - description: "The version of YouTube" - default: "" - required: true - type: string ytliteplus_version: description: "The version of YTLitePlus" default: "3.0.1" @@ -103,26 +98,15 @@ jobs: - name: Prepare YouTube iPA run: | wget "$YOUTUBE_URL" --no-verbose -O main/YouTube.ipa - echo -e "==> \033[1mYouTube v${{ inputs.youtube_version }} downloaded! \033[0m" unzip -q main/YouTube.ipa -d main/tmp - # New echo yt_version=$(grep -A 1 "CFBundleVersion" main/tmp/Payload/YouTube.app/Info.plist | grep "" | awk -F'[><]' '{print $3}') >> "$GITHUB_ENV" - echo "$yt_version" - # New end rm -rf main/tmp/Payload/YouTube.app/_CodeSignature/CodeResources rm -rf main/tmp/Payload/YouTube.app/PlugIns/* cp -R main/Extensions/*.appex main/tmp/Payload/YouTube.app/PlugIns - echo -e "==> \033[1mYouTube v${{ inputs.youtube_version }} unpacked! \033[0m" env: THEOS: ${{ github.workspace }}/theos - YOUTUBE_VERSION: ${{ inputs.youtube_version }} YOUTUBE_URL: ${{ inputs.decrypted_youtube_url }} - - name: show yt version - run: | - echo "$yt_version" - exit 1 - - name: Fix Compiling & Build Package id: build_package run: | @@ -131,7 +115,7 @@ jobs: cd ${{ github.workspace }}/main sed -i '' "12s#.*#BUNDLE_ID = ${{ env.BUNDLE_ID }}#g" Makefile sed -i '' "11s#.*#DISPLAY_NAME = ${{ env.APP_NAME }}#g" Makefile - sed -i '' "s/^PACKAGE_VERSION.*$/PACKAGE_VERSION = ${{ inputs.youtube_version }}-${{ inputs.ytliteplus_version }}/" Makefile + sed -i '' "s/^PACKAGE_VERSION.*$/PACKAGE_VERSION = "$yt_version"-${{ inputs.ytliteplus_version }}/" Makefile make package FINALPACKAGE=1 (mv "packages/$(ls -t packages | head -n1)" "packages/YTLitePlus_${{ env.YOUTUBE_VERSION }}_${{ env.ytliteplus_version }}.ipa") echo "package=$(ls -t packages | head -n1)" >>$GITHUB_OUTPUT @@ -140,7 +124,6 @@ jobs: env: THEOS: ${{ github.workspace }}/theos ytliteplus_version: ${{ inputs.ytliteplus_version }} - YOUTUBE_VERSION: ${{ inputs.youtube_version }} BUNDLE_ID: ${{ inputs.bundle_id }} APP_NAME: ${{ inputs.app_name }} @@ -148,16 +131,15 @@ jobs: uses: actions/upload-artifact@v4.3.1 env: ytliteplus_version: ${{ inputs.ytliteplus_version }} - YOUTUBE_VERSION: ${{ inputs.youtube_version }} with: - name: YTLitePlus_${{ env.YOUTUBE_VERSION }}_${{ env.ytliteplus_version }} + name: YTLitePlus_"$yt_version"_${{ env.ytliteplus_version }} path: ${{ github.workspace }}/main/packages/${{ steps.build_package.outputs.package }} if-no-files-found: error - name: Prepare Release Notes run: | export TODAY=$(date '+%Y-%m-%d') - sed "s/%ytliteplus_version%/${{ inputs.ytliteplus_version }}/g; s/%youtube_version%/${{ inputs.youtube_version }}/g; s/%date%/$TODAY/g" \ + sed "s/%ytliteplus_version%/${{ inputs.ytliteplus_version }}/g; s/%youtube_version%/'$yt_version'/g; s/%date%/$TODAY/g" \ main/.github/RELEASE_TEMPLATE/Release.md > ${{ github.workspace }}/release_notes.md - name: Create Release @@ -166,11 +148,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ytliteplus_version: ${{ inputs.ytliteplus_version }} - YOUTUBE_VERSION: ${{ inputs.youtube_version }} DRAFT: ${{ inputs.create_release }} with: - tag_name: v${{ env.YOUTUBE_VERSION }}-${{ env.ytliteplus_version }} - name: v${{ env.YOUTUBE_VERSION }}-${{ env.ytliteplus_version }} - YTLitePlus + tag_name: v"$yt_version"-${{ env.ytliteplus_version }} + name: v"$yt_version"-${{ env.ytliteplus_version }} - YTLitePlus files: main/packages/*.ipa draft: ${{ env.DRAFT }} body_path: ${{ github.workspace }}/release_notes.md