@@ -31,30 +31,30 @@ jobs:
31
31
repo_name="SnapEnhance"
32
32
workflow_name="beta.yml"
33
33
pat="${{ secrets.SNAPENHANCEWORKFLOWARTIFACT }}"
34
-
35
- # Fetching the latest run for the specified workflow
36
- run_url=$(curl -s -H "Authorization : Bearer $pat" \
37
- " https://api.github.com/repos/${repo_owner}/${repo_name}/actions/workflows/${workflow_name}/runs?status=success&per_page=1" \
38
- | jq -r '.workflow_runs[0].url')
39
34
40
- # Fetching the artifact ID from the latest run
41
- artifact_id =$(curl -s -H "Authorization : Bearer $pat" \
42
- " $run_url/artifacts " \
43
- | jq -r '.artifacts [0].id ')
35
+ # Fetching the latest run for the specified workflow
36
+ run_url =$(curl -s -H "Authorization: Bearer $pat" \
37
+ "https://api.github.com/repos/${repo_owner}/${repo_name}/actions/workflows/${workflow_name}/runs?status=success&per_page=1 " \
38
+ | jq -r '.workflow_runs [0].url ')
44
39
45
- # Downloading the artifact using curl
46
- curl -u ${{ secrets.GITHUB_TOKEN }} \
47
- -L -o core.zip \
48
- " https://api.github.com/repos/${repo_owner}/${repo_name}/actions/ artifacts/${artifact_id}/zip "
40
+ # Fetching the artifact ID from the latest run
41
+ artifact_id=$( curl -s -H "Authorization: Bearer $pat" \
42
+ "$run_url/artifacts" \
43
+ | jq -r '. artifacts[0].id')
49
44
50
- # Unzipping the artifact
51
- unzip -q core.zip -d artifact
52
- shell : bash
45
+ # Downloading the artifact using curl
46
+ curl -u ${{ secrets.GITHUB_TOKEN }} \
47
+ -L -o core.zip \
48
+ "https://api.github.com/repos/${repo_owner}/${repo_name}/actions/artifacts/${artifact_id}/zip"
49
+
50
+ # Unzipping the artifact
51
+ unzip -q core.zip -d artifact
52
+ shell : bash
53
53
54
54
- name : Run the command
55
55
run : |
56
56
java -jar lspatch.jar -m artifact/core.apk -f -l 2 -v snap.apk
57
- working-directory: $GITHUB_WORKSPACE
57
+ working-directory : $GITHUB_WORKSPACE
58
58
59
59
- name : Upload artifact
60
60
uses : actions/upload-artifact@v2
78
78
uses : softprops/action-gh-release@v1
79
79
with :
80
80
files : snap-360-lspatched.apk
81
- tag_name : ${{ env.RELEASE_VERSION }}
81
+ tag_name : ${{ env.RELEASE_VERSION }}
0 commit comments