Skip to content

Commit c34ab3e

Browse files
committed
Reduce the need of Downloading files
1 parent f3e4389 commit c34ab3e

File tree

2 files changed

+4
-40
lines changed

2 files changed

+4
-40
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ jobs:
4242
- name: Run APK Download Script
4343
run: |
4444
./script.sh
45-
46-
- name: Download core APK
47-
run: |
48-
wget "https://raw.githubusercontent.com/ABCPascal/SnapEnhanceModGen/main/core.apk" -O "$GITHUB_WORKSPACE/core.apk"
49-
shell: bash
5045
5146
- name: Run the command
5247
run: |

.github/workflows/schedule.yml

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -42,48 +42,16 @@ jobs:
4242
run: |
4343
./script.sh
4444
45-
- name: Fetch latest release information
46-
id: fetch-release
47-
run: |
48-
repo_owner="rhunk"
49-
repo_name="SnapEnhance"
50-
api_url="https://api.github.com/repos/${repo_owner}/${repo_name}/releases/latest"
51-
release_info=$(curl -s "$api_url")
52-
release_id=$(echo $release_info | jq -r '.id')
53-
release_tag_name=$(echo $release_info | jq -r '.tag_name')
54-
55-
# Find the asset URL for APK files
56-
asset_url=""
57-
for asset in $(echo $release_info | jq -c '.assets[]'); do
58-
asset_name=$(echo $asset | jq -r '.name')
59-
if [[ $asset_name == *"armv8"* && $asset_name == *".apk" ]]; then
60-
asset_url=$(echo $asset | jq -r '.browser_download_url')
61-
break
62-
fi
63-
done
64-
65-
echo "release_id=$release_id" >> $GITHUB_ENV
66-
echo "release_tag_name=$release_tag_name" >> $GITHUB_ENV
67-
echo "asset_url=$asset_url" >> $GITHUB_ENV
68-
shell: bash
69-
70-
- name: Download the latest APK
71-
run: |
72-
release_id="${{ env.release_id }}"
73-
asset_url="${{ env.asset_url }}"
74-
release_tag_name="${{ env.release_tag_name }}"
75-
wget "$asset_url" -O "$GITHUB_WORKSPACE/latest-snapenhance-${release_tag_name}.apk"
76-
shell: bash
77-
7845
- name: Run the command
7946
run: |
80-
java -jar lspatch.jar -m latest-snapenhance-${release_tag_name}.apk -f -l 2 -v snap.apk
47+
java -jar lspatch.jar -m "$GITHUB_WORKSPACE/core.apk" -f -l 2 -v snap.apk
8148
8249
- name: Upload artifact
8350
uses: actions/upload-artifact@v2
8451
with:
8552
name: snap-360-lspatched.apk
8653
path: ./snap-360-lspatched.apk
54+
8755
- name: Check if the release already exists
8856
id: check_release
8957
run: |
@@ -94,9 +62,10 @@ jobs:
9462
RELEASE_VERSION=$(echo $RELEASE_VERSION | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./')
9563
fi
9664
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
65+
9766
- name: Create or Update Release
9867
id: create_release
9968
uses: softprops/action-gh-release@v1
10069
with:
10170
files: snap-360-lspatched.apk
102-
tag_name: ${{ env.RELEASE_VERSION }}
71+
tag_name: ${{ env.RELEASE_VERSION }}

0 commit comments

Comments
 (0)