Skip to content

Commit fb73b09

Browse files
Automated steam release (#71)
Co-authored-by: Chris Kaiser <chris.kaiser@bahmut.de>
1 parent 375c394 commit fb73b09

File tree

16 files changed

+133
-0
lines changed

16 files changed

+133
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Publish Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
mod:
7+
description: 'Which mod?'
8+
required: true
9+
type: choice
10+
options:
11+
- 'Industries Rework - Food;0'
12+
- 'Industries Rework - Food;3330261506'
13+
- 'Industries Rework - Military;3324254588'
14+
- 'Industries Rework - Ranches;3394847149'
15+
- 'Populist Legal Power;3351014672'
16+
- 'Sinosphere Korean;3108195724'
17+
- 'Smarter Private Construction;3115017647'
18+
- 'Soft Econ Adjustments;3345217364'
19+
- 'Soft Pop Adjustments;3336914177'
20+
- 'Subject Interaction Suite;3276243851'
21+
- 'Tweaked Starting Conditions;3306851845'
22+
- 'Urban Synergy Unleashed;3371689443'
23+
- 'USU LLWA;3387021675'
24+
- 'USU Morgenrote;3371690718'
25+
26+
jobs:
27+
release:
28+
name: "Publish Release"
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4.2.2
34+
35+
- name: Setup Metadata
36+
id: metadata
37+
run: script/split-mod.sh "${{ inputs.mod }}"
38+
39+
- name: Clean Repository
40+
run: |
41+
mkdir ../steam-release
42+
mv "${{ steps.metadata.outputs.mod-name }}/STEAM_PAGE.bbcode" ../steam-release/STEAM_PAGE.bbcode
43+
rm -f "${{ steps.metadata.outputs.mod-name }}/vic3-tiger.conf"
44+
rm -f "${{ steps.metadata.outputs.mod-name }}/design_notes.txt"
45+
46+
# Create mod metadata for the steam release
47+
# Uses STEAM_PAGE.bbcode to update steam description
48+
# Report: Generated metadata
49+
- name: Create Workshop Metadata
50+
id: steam-metadata
51+
shell: bash
52+
run: |
53+
../steam-release/create-release-vdf.sh "${{ github.workspace }}/${{ steps.metadata.outputs.mod-name }}" ../steam-release/STEAM_PAGE.bbcode "${{ steps.metadata.outputs.mod-id }}"
54+
mv workshop.vdf ../steam-release/workshop.vdf
55+
echo "vdf=$(realpath ../steam-release/workshop.vdf)" >> "$GITHUB_OUTPUT"
56+
echo "# Workflow Metadata" >> $GITHUB_STEP_SUMMARY
57+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
58+
echo "$(cat < ../steam-release/workshop.vdf)" >> $GITHUB_STEP_SUMMARY
59+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
60+
61+
- name: Setup SteamCMD
62+
uses: buildalon/setup-steamcmd@v1.0.4
63+
64+
# Publish to steam workshop
65+
# Uses generated metadata and configured workshop user
66+
- name: Publish to Workshop
67+
shell: bash
68+
run: |
69+
steamcmd +login ${{ secrets.WORKSHOP_USERNAME }} ${{ secrets.WORKSHOP_PASSWORD }} +workshop_build_item ${{ steps.steam-metadata.outputs.vdf }} +quit
70+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)