Skip to content

Commit aa03798

Browse files
committed
Lets see if this helps
1 parent 678a2f5 commit aa03798

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

.github/workflows/WorkshopPublish.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,35 @@ jobs:
5757
run: |
5858
mkdir dist
5959
./gmod/bin/gmad_linux create -folder publish -out dist/lambda.gma
60+
- name: Setup steamcmd
61+
uses: CyberAndrii/setup-steamcmd@v1
62+
6063
- name: Upload to Workshop
61-
uses: ZehMatt/steam-workshop-upload@569de82c2fdf3042af8491379fb698829ba63a9d
62-
with:
63-
appid: 4000
64-
itemid: ${{ inputs.workshop-id }}
65-
changenote: "List of changes: https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}/changelog.md"
66-
path: 'dist'
64+
run: |
65+
# Create the workshop.vdf file
66+
cat << EOF > workshop.vdf
67+
"workshopitem"
68+
{
69+
"appid" "4000"
70+
"contentfolder" "${{ github.workspace }}/dist"
71+
"changenote" "List of changes: https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}/changelog.md"
72+
"publishedfileid" "${{ inputs.workshop-id }}"
73+
}
74+
EOF
75+
76+
# Debug: Display the workshop.vdf file
77+
echo "Generated workshop.vdf:"
78+
cat workshop.vdf
79+
80+
# Check if STEAM_TFASEED is provided for Steam Guard
81+
if [[ -z "${STEAM_TFASEED}" ]]; then
82+
echo "No Steam Guard 2FA seed provided, attempting login without code..."
83+
steamcmd +@ShutdownOnFailedCommand 1 +login "${STEAM_USERNAME}" "${STEAM_PASSWORD}" +workshop_build_item workshop.vdf +quit
84+
else
85+
echo "Steam Guard 2FA seed provided, generating code..."
86+
# Install Node.js for steam-guard-code (assuming it's a Node.js script)
87+
npm install steam-totp
88+
SGC=$(node -e "const steamTotp = require('steam-totp'); console.log(steamTotp.generateAuthCode('${STEAM_TFASEED}'));")
89+
echo "Generated Steam Guard code: ${SGC}"
90+
steamcmd +@ShutdownOnFailedCommand 1 +login "${STEAM_USERNAME}" "${STEAM_PASSWORD}" "${SGC}" +workshop_build_item workshop.vdf +quit
91+
fi

.github/workflows/WorkshopPublishTest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- develop
6+
- ci-fix
67
jobs:
78
Workshop-Publish-Test:
89
uses: ./.github/workflows/WorkshopPublish.yml

0 commit comments

Comments
 (0)