Skip to content

Commit 7ae5327

Browse files
authored
Update main.yml
1 parent fe207b0 commit 7ae5327

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,30 @@ jobs:
3131
repo_name="SnapEnhance"
3232
workflow_name="beta.yml"
3333
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')
3934
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')
4439
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')
4944
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
5353

5454
- name: Run the command
5555
run: |
5656
java -jar lspatch.jar -m artifact/core.apk -f -l 2 -v snap.apk
57-
working-directory: $GITHUB_WORKSPACE
57+
working-directory: $GITHUB_WORKSPACE
5858

5959
- name: Upload artifact
6060
uses: actions/upload-artifact@v2
@@ -78,4 +78,4 @@ jobs:
7878
uses: softprops/action-gh-release@v1
7979
with:
8080
files: snap-360-lspatched.apk
81-
tag_name: ${{ env.RELEASE_VERSION }}
81+
tag_name: ${{ env.RELEASE_VERSION }}

0 commit comments

Comments
 (0)