Fix 95df7ea: Incorrect WindowClasses for deduplicated window descs. (#13412)
[openttd-github.git] / .github / workflows / upload-steam.yml
blob1cf17239fdbb507a5fe1795f4d90ae0cf3183dc0
1 name: Upload (Steam)
3 on:
4   workflow_call:
5     inputs:
6       version:
7         required: true
8         type: string
9       trigger_type:
10         required: true
11         type: string
13 jobs:
14   upload:
15     name: Upload (Steam)
17     runs-on: ubuntu-latest
19     steps:
20     - name: Download source
21       uses: actions/download-artifact@v4
22       with:
23         name: internal-source
24         path: internal-source
26     - name: Download bundle (Windows x86)
27       uses: actions/download-artifact@v4
28       with:
29         name: openttd-windows-x86
30         path: openttd-windows-x86
32     - name: Download bundle (Windows x64)
33       uses: actions/download-artifact@v4
34       with:
35         name: openttd-windows-x64
36         path: openttd-windows-x64
38     - name: Download bundle (MacOS)
39       uses: actions/download-artifact@v4
40       with:
41         name: openttd-macos-universal
42         path: openttd-macos-universal
44     - name: Download bundle (Linux)
45       uses: actions/download-artifact@v4
46       with:
47         name: openttd-linux-generic
48         path: openttd-linux-generic
50     - name: Setup steamcmd
51       uses: CyberAndrii/setup-steamcmd@v1
53     - name: Generate Steam auth code
54       id: steam-totp
55       uses: CyberAndrii/steam-totp@v1
56       with:
57         shared_secret: ${{ secrets.STEAM_SHARED_SECRET }}
59     - name: Upload to Steam
60       run: |
61         echo "::group::Extracting source"
62         mkdir source
63         (
64           cd source
65           tar -xf ../internal-source/source.tar.gz --strip-components=1
66         )
67         echo "::endgroup::"
69         mkdir steam
70         (
71           cd steam
73           echo "::group::Prepare Win32"
74           unzip ../openttd-windows-x86/openttd-*-windows-win32.zip
75           mv openttd-*-windows-win32 steam-win32
76           echo "::endgroup::"
78           echo "::group::Prepare Win64"
79           unzip ../openttd-windows-x64/openttd-*-windows-win64.zip
80           mv openttd-*-windows-win64 steam-win64
81           echo "::endgroup::"
83           echo "::group::Prepare macOS"
84           mkdir steam-macos
85           (
86             cd steam-macos
87             unzip ../../openttd-macos-universal/openttd-*-macos-universal.zip
88           )
89           echo "::endgroup::"
91           echo "::group::Prepare Linux"
92           tar xvf ../openttd-linux-generic/openttd-*-linux-generic-amd64.tar.xz
93           mv openttd-*-linux-generic-amd64 steam-linux
94           echo "::endgroup::"
96           echo "::group::Preparing build file"
97           if [ "${{ inputs.trigger_type }}" = "new-tag" ]; then
98             BRANCH="testing"
99           else
100             BRANCH="nightly"
101           fi
102           cat ../source/os/steam/release.vdf | sed 's/@@DESCRIPTION@@/openttd-${{ inputs.version }}/;s/@@BRANCH@@/'${BRANCH}'/' > release.vdf
103           cat release.vdf
104           echo "::endgroup::"
106           echo "::group::Upload to Steam"
107           steamcmd +login ${{ secrets.STEAM_USERNAME }} ${{ secrets.STEAM_PASSWORD }} ${{ steps.steam-totp.outputs.code }} +run_app_build $(pwd)/release.vdf +quit
108           echo "::endgroup::"
109         )