4
4
push :
5
5
paths :
6
6
- ' push-here.md'
7
+ - ' **/core.apk'
7
8
8
9
jobs :
9
10
build :
@@ -24,37 +25,37 @@ jobs:
24
25
with :
25
26
node-version : 16
26
27
27
- - name : Get Latest Artifact URL
28
- id : get_artifact
29
- run : |
30
- repo_owner="rhunk"
31
- repo_name="SnapEnhance"
32
- workflow_name="beta.yml"
33
- pat="${{ secrets.SNAP_ENHANCE_WORKFLOW_ARTIFACT }}"
28
+ - name : Check out code
29
+ uses : actions/checkout@v2
34
30
35
- artifact_url=$(curl -s -H "Authorization: Bearer $pat" \
36
- "https://api.github.com/repos/${repo_owner}/${repo_name}/actions/workflows/${workflow_name}/runs?status=success&per_page=1" \
37
- | jq -r '.workflow_runs[0].artifacts_url')
31
+ - name : Install dependencies
32
+ run : |
33
+ sudo apt-get update
34
+ sudo apt-get install -y jq curl
35
+ shell : bash
38
36
39
- download_url=$(curl -s -H "Authorization: Bearer $pat" \
40
- "$artifact_url" \
41
- | jq -r '.artifacts[0].archive_download_url')
37
+ - name : Install unzip
38
+ run : sudo apt-get install unzip -y
42
39
43
- echo "Artifact URL: $artifact_url"
44
- echo "Download URL: $download_url"
40
+ - name : Install pup
41
+ run : |
42
+ wget https://github.com/ericchiang/pup/releases/download/v0.4.0/pup_v0.4.0_linux_amd64.zip -O pup.zip
43
+ unzip pup.zip
44
+ chmod +x pup
45
+ sudo mv pup /usr/local/bin/
46
+ working-directory : .
45
47
46
- echo "download_url=$download_url" >> $GITHUB_ENV
47
- shell : bash
48
+ - name : Grant execute permissions to script
49
+ run : chmod +x script.sh
50
+ working-directory : .
48
51
49
- - name : Download Latest core.apk
52
+ - name : Run APK Download Script
50
53
run : |
51
- download_url="${{ env.download_url }}"
52
- wget "$download_url" -O "$GITHUB_WORKSPACE/core.apk"
54
+ ./script.sh
53
55
54
56
- name : Run the command
55
57
run : |
56
- java -jar lspatch.jar -m artifact/core.apk -f -l 2 -v snap.apk
57
- working-directory : $GITHUB_WORKSPACE
58
+ java -jar lspatch.jar -m "$GITHUB_WORKSPACE/core.apk" -f -l 2 -v snap.apk
58
59
59
60
- name : Upload artifact
60
61
uses : actions/upload-artifact@v2
78
79
uses : softprops/action-gh-release@v1
79
80
with :
80
81
files : snap-360-lspatched.apk
81
- tag_name : ${{ env.RELEASE_VERSION }}
82
+ tag_name : ${{ env.RELEASE_VERSION }}-Beta # Append "-Beta" to the tag name
0 commit comments