Skip to content

Commit 48cfa19

Browse files
committed
change workflow, update achievements
change workflow get version to prevent errors
1 parent 085b3c4 commit 48cfa19

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

.github/workflows/generate.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ jobs:
2222
- name: Set vars
2323
id: var
2424
run: |
25-
packageId="com.kiloo.subwaysurf"
26-
echo "packageId=$packageId" >> $GITHUB_OUTPUT
2725
if [ -z "${{ github.event.inputs.version }}" ]; then
28-
version=$(curl -s "https://gplayapi.herrerde.xyz/api/apps/$packageId" | jq -r '.version' | awk -F '.' '{print $1 "." $2 ".0"}')
26+
version=$(curl -s "https://api.github.com/repos/HerrErde/subway-source/releases/latest" | jq -r '.name')
2927
else
30-
version=$(echo "${{ github.event.inputs.version }}" | tr '.' '-')
28+
version=$(echo "${{ github.event.inputs.version }}" | tr '-' '.')
3129
fi
3230
echo "version=$version" >> $GITHUB_OUTPUT
3331
changelog=$(curl -s "https://api.github.com/repos/HerrErde/subway-source/releases/latest" | jq -r '.body' | tr '\n' '\r\n')
@@ -71,13 +69,8 @@ jobs:
7169
git config user.name "GitHub Actions"
7270
git config user.email "[email protected]"
7371
git add src/
74-
if ! git diff --cached --quiet; then
75-
git commit -m "auto update files ${{ steps.var.outputs.version }}"
76-
git push
77-
else
78-
git commit --allow-empty -m "no change ${{ steps.var.outputs.version }}"
79-
git push
80-
fi
72+
git commit -am "auto update files ${{steps.var.outputs.version}}"
73+
git push
8174
8275
- name: Convert & Zip
8376
run: |

script/achievements.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"progress": progress,
2828
"highestProgress": progress,
2929
"goals": tier_goals,
30-
"claimState": [True, True, True, True],
30+
"claimState": [True for _ in tier_goals],
31+
"markAsViewed": True,
3132
}
3233

3334
with open("src/profile/achievements.json", "w", encoding="utf-8") as output_file:

0 commit comments

Comments
 (0)