mirror of
				https://github.com/SoPat712/YTLitePlus.git
				synced 2025-10-30 20:34:04 -04:00 
			
		
		
		
	Automatically get Youtube version from the ipa itself (#100)
* See what's inside an unpacked .ipa * cat the plist that has the info which yt version we're getting * extract the version and see how available the variable is * Use yt_version variable in build process * single quote also the first sed to avoid double quoting * Update buildapp.yml * Update buildapp.yml * Update buildapp.yml * Update buildapp.yml * try it this way? * the grand final! * Use Info.plist within ipa to determin yt version instead
This commit is contained in:
		
							
								
								
									
										25
									
								
								.github/workflows/buildapp.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										25
									
								
								.github/workflows/buildapp.yml
									
									
									
									
										vendored
									
									
								
							| @@ -11,11 +11,6 @@ on: | |||||||
|         default: "" |         default: "" | ||||||
|         required: true |         required: true | ||||||
|         type: string |         type: string | ||||||
|       youtube_version: |  | ||||||
|         description: "The version of YouTube" |  | ||||||
|         default: "" |  | ||||||
|         required: true |  | ||||||
|         type: string |  | ||||||
|       ytliteplus_version: |       ytliteplus_version: | ||||||
|         description: "The version of YTLitePlus" |         description: "The version of YTLitePlus" | ||||||
|         default: "3.0.1" |         default: "3.0.1" | ||||||
| @@ -103,16 +98,13 @@ jobs: | |||||||
|       - name: Prepare YouTube iPA |       - name: Prepare YouTube iPA | ||||||
|         run: | |         run: | | ||||||
|           wget "$YOUTUBE_URL" --no-verbose -O main/YouTube.ipa |           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 |           unzip -q main/YouTube.ipa -d main/tmp | ||||||
|  |           echo "YT_VERSION=$(grep -A 1 '<key>CFBundleVersion</key>' main/tmp/Payload/YouTube.app/Info.plist | grep '<string>' | awk -F'[><]' '{print $3}')" >> $GITHUB_ENV | ||||||
|           rm -rf main/tmp/Payload/YouTube.app/_CodeSignature/CodeResources |           rm -rf main/tmp/Payload/YouTube.app/_CodeSignature/CodeResources | ||||||
|           rm -rf main/tmp/Payload/YouTube.app/PlugIns/* |           rm -rf main/tmp/Payload/YouTube.app/PlugIns/* | ||||||
|           cp -R main/Extensions/*.appex 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: |         env: | ||||||
|           THEOS: ${{ github.workspace }}/theos |           THEOS: ${{ github.workspace }}/theos | ||||||
|           YOUTUBE_VERSION: ${{ inputs.youtube_version }} |  | ||||||
|           YOUTUBE_URL: ${{ inputs.decrypted_youtube_url }} |           YOUTUBE_URL: ${{ inputs.decrypted_youtube_url }} | ||||||
|  |  | ||||||
|       - name: Fix Compiling & Build Package |       - name: Fix Compiling & Build Package | ||||||
| @@ -123,16 +115,15 @@ jobs: | |||||||
|           cd ${{ github.workspace }}/main |           cd ${{ github.workspace }}/main | ||||||
|           sed -i '' "12s#.*#BUNDLE_ID = ${{ env.BUNDLE_ID }}#g" Makefile |           sed -i '' "12s#.*#BUNDLE_ID = ${{ env.BUNDLE_ID }}#g" Makefile | ||||||
|           sed -i '' "11s#.*#DISPLAY_NAME = ${{ env.APP_NAME }}#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 = ${{ env.YT_VERSION }}-${{ inputs.ytliteplus_version }}/" Makefile | ||||||
|           make package FINALPACKAGE=1 |           make package FINALPACKAGE=1 | ||||||
|           (mv "packages/$(ls -t packages | head -n1)" "packages/YTLitePlus_${{ env.YOUTUBE_VERSION }}_${{ env.ytliteplus_version }}.ipa")         |           (mv "packages/$(ls -t packages | head -n1)" "packages/YTLitePlus_${{ env.YT_VERSION }}_${{ env.ytliteplus_version }}.ipa")         | ||||||
|           echo "package=$(ls -t packages | head -n1)" >>$GITHUB_OUTPUT |           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[1mSHASUM256: $(shasum -a 256 packages/*.ipa | cut -f1 -d' ')\033[0m" | ||||||
|           echo -e "==> \033[1mBundle ID: ${{ env.BUNDLE_ID }}\033[0m" |           echo -e "==> \033[1mBundle ID: ${{ env.BUNDLE_ID }}\033[0m" | ||||||
|         env: |         env: | ||||||
|           THEOS: ${{ github.workspace }}/theos |           THEOS: ${{ github.workspace }}/theos | ||||||
|           ytliteplus_version: ${{ inputs.ytliteplus_version }} |           ytliteplus_version: ${{ inputs.ytliteplus_version }} | ||||||
|           YOUTUBE_VERSION: ${{ inputs.youtube_version }} |  | ||||||
|           BUNDLE_ID: ${{ inputs.bundle_id }} |           BUNDLE_ID: ${{ inputs.bundle_id }} | ||||||
|           APP_NAME: ${{ inputs.app_name }} |           APP_NAME: ${{ inputs.app_name }} | ||||||
|  |  | ||||||
| @@ -140,16 +131,15 @@ jobs: | |||||||
|         uses: actions/upload-artifact@v4.3.1 |         uses: actions/upload-artifact@v4.3.1 | ||||||
|         env: |         env: | ||||||
|           ytliteplus_version: ${{ inputs.ytliteplus_version }} |           ytliteplus_version: ${{ inputs.ytliteplus_version }} | ||||||
|           YOUTUBE_VERSION: ${{ inputs.youtube_version }} |  | ||||||
|         with: |         with: | ||||||
|           name: YTLitePlus_${{ env.YOUTUBE_VERSION }}_${{ env.ytliteplus_version }} |           name: YTLitePlus_${{ env.YT_VERSION }}_${{ env.ytliteplus_version }} | ||||||
|           path: ${{ github.workspace }}/main/packages/${{ steps.build_package.outputs.package }} |           path: ${{ github.workspace }}/main/packages/${{ steps.build_package.outputs.package }} | ||||||
|           if-no-files-found: error |           if-no-files-found: error | ||||||
|        |        | ||||||
|       - name: Prepare Release Notes |       - name: Prepare Release Notes | ||||||
|         run: | |         run: | | ||||||
|           export TODAY=$(date '+%Y-%m-%d') |           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%/${{ env.YT_VERSION }}/g; s/%date%/$TODAY/g" \ | ||||||
|           main/.github/RELEASE_TEMPLATE/Release.md > ${{ github.workspace }}/release_notes.md |           main/.github/RELEASE_TEMPLATE/Release.md > ${{ github.workspace }}/release_notes.md | ||||||
|  |  | ||||||
|       - name: Create Release |       - name: Create Release | ||||||
| @@ -158,11 +148,10 @@ jobs: | |||||||
|         env: |         env: | ||||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
|           ytliteplus_version: ${{ inputs.ytliteplus_version }} |           ytliteplus_version: ${{ inputs.ytliteplus_version }} | ||||||
|           YOUTUBE_VERSION: ${{ inputs.youtube_version }} |  | ||||||
|           DRAFT: ${{ inputs.create_release }} |           DRAFT: ${{ inputs.create_release }} | ||||||
|         with: |         with: | ||||||
|           tag_name: v${{ env.YOUTUBE_VERSION }}-${{ env.ytliteplus_version }} |           tag_name: v${{ env.YT_VERSION }}-${{ env.ytliteplus_version }} | ||||||
|           name: v${{ env.YOUTUBE_VERSION }}-${{ env.ytliteplus_version }} - YTLitePlus |           name: v${{ env.YT_VERSION }}-${{ env.ytliteplus_version }} - YTLitePlus | ||||||
|           files: main/packages/*.ipa |           files: main/packages/*.ipa | ||||||
|           draft: ${{ env.DRAFT }} |           draft: ${{ env.DRAFT }} | ||||||
|           body_path: ${{ github.workspace }}/release_notes.md |           body_path: ${{ github.workspace }}/release_notes.md | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Macley
					Macley