Skip to content

Commit 45ddd81

Browse files
committed
upload description via web api instead
1 parent c16e7cc commit 45ddd81

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

.github/workflows/build-release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,18 @@ jobs:
9090
rm -rf "$STEAM_CMD"
9191
rm -rf "$STEAM_DIR"
9292
rm -rf "$STEAM_TEMP"
93-
93+
94+
- name: Publish description via Steam Web API
95+
if: ${{ inputs.update-description == 'true' }}
96+
env:
97+
STEAM_WEB_API_KEY: ${{ secrets.STEAM_WEB_API_KEY }}
98+
APPID: "529340"
99+
MOD_ID: ${{ steps.metadata.outputs.mod-id }}
100+
run: |
101+
desc="$(< ../steam-release/STEAM_PAGE.bbcode)"
102+
curl -X POST "https://api.steampowered.com/ISteamRemoteStorage/SetPublishedFileDetails/v1/" \
103+
-d "key=${STEAM_WEB_API_KEY}" \
104+
-d "appid=${APPID}" \
105+
-d "publishedfileid=${MOD_ID}" \
106+
--data-urlencode "description=${desc}" \
107+
|| exit 1

script/create-release-vdf.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,20 @@ else
2222
fi
2323

2424
# Check mod description
25-
if [ -f "$3" ]; then
26-
description=$(sed -e ':a;N;$!ba' -e 's/\r//g' -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/\n/\\n/g' "$3")
25+
#if [ -f "$3" ]; then
26+
# description=$(sed -e ':a;N;$!ba' -e 's/\r//g' -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/\n/\\n/g' "$3")
2727
# slurp entire file -e ':a;N;$!ba'
2828
# remove any stray CR (^M) -e 's/\r//g'
2929
# escape backslashes -e 's/\\/\\\\/g'
3030
# escape double-quotes -e 's/"/\\"/g'
3131
# escape newlines -e 's/\n/\\n/g'
32-
echo ">>> DEBUG: first 200 chars of desc:" >&2
33-
printf '%s' "$description" | cut -c1-200 >&2
34-
else
35-
printf 'Missing Steam description'
36-
printf '\n'
37-
fi
32+
# echo ">>> DEBUG: first 200 chars of desc:" >&2
33+
# printf '%s' "$description" | cut -c1-200 >&2
34+
#else
35+
# printf 'Missing Steam description'
36+
# printf '\n'
37+
#fi
38+
description=""
3839

3940
# Clean up old file
4041
printf '' > workshop.vdf

0 commit comments

Comments
 (0)