Skip to content

Commit f3e4389

Browse files
committed
Test workflow to patch with CI Builds
1 parent ae6c7c5 commit f3e4389

File tree

2 files changed

+6
-32
lines changed

2 files changed

+6
-32
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -43,48 +43,21 @@ jobs:
4343
run: |
4444
./script.sh
4545
46-
- name: Fetch latest release information
47-
id: fetch-release
46+
- name: Download core APK
4847
run: |
49-
repo_owner="rhunk"
50-
repo_name="SnapEnhance"
51-
api_url="https://api.github.com/repos/${repo_owner}/${repo_name}/releases/latest"
52-
release_info=$(curl -s "$api_url")
53-
release_id=$(echo $release_info | jq -r '.id')
54-
release_tag_name=$(echo $release_info | jq -r '.tag_name')
55-
56-
# Find the asset URL for APK files
57-
asset_url=""
58-
for asset in $(echo $release_info | jq -c '.assets[]'); do
59-
asset_name=$(echo $asset | jq -r '.name')
60-
if [[ $asset_name == *"armv8"* && $asset_name == *".apk" ]]; then
61-
asset_url=$(echo $asset | jq -r '.browser_download_url')
62-
break
63-
fi
64-
done
65-
66-
echo "release_id=$release_id" >> $GITHUB_ENV
67-
echo "release_tag_name=$release_tag_name" >> $GITHUB_ENV
68-
echo "asset_url=$asset_url" >> $GITHUB_ENV
69-
shell: bash
70-
71-
- name: Download the latest APK
72-
run: |
73-
release_id="${{ env.release_id }}"
74-
asset_url="${{ env.asset_url }}"
75-
release_tag_name="${{ env.release_tag_name }}"
76-
wget "$asset_url" -O "$GITHUB_WORKSPACE/latest-snapenhance-${release_tag_name}.apk"
48+
wget "https://raw.githubusercontent.com/ABCPascal/SnapEnhanceModGen/main/core.apk" -O "$GITHUB_WORKSPACE/core.apk"
7749
shell: bash
7850

7951
- name: Run the command
8052
run: |
81-
java -jar lspatch.jar -m latest-snapenhance-${release_tag_name}.apk -f -l 2 -v snap.apk
53+
java -jar lspatch.jar -m "$GITHUB_WORKSPACE/core.apk" -f -l 2 -v snap.apk
8254
8355
- name: Upload artifact
8456
uses: actions/upload-artifact@v2
8557
with:
8658
name: snap-360-lspatched.apk
8759
path: ./snap-360-lspatched.apk
60+
8861
- name: Check if the release already exists
8962
id: check_release
9063
run: |
@@ -95,6 +68,7 @@ jobs:
9568
RELEASE_VERSION=$(echo $RELEASE_VERSION | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./')
9669
fi
9770
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
71+
9872
- name: Create or Update Release
9973
id: create_release
10074
uses: softprops/action-gh-release@v1

push-here.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# A File to do dirty stuff - push in this file to trigger action
22
Snap 12.68.0.23 Beta & SnapEnhance CI Build ffd42de
33

4-
Add a dot here: ....
4+
Add a dot here: .....

0 commit comments

Comments
 (0)