Merge branch 'ci-fix'

This commit is contained in:
2025-07-06 10:26:09 -07:00

View File

@ -86,20 +86,33 @@ jobs:
steam-publish: steam-publish:
name: Steam Publish name: Steam Publish
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
container: # The container is no longer needed
image: cm2network/steamcmd:root # container:
# image: cm2network/steamcmd:root
needs: [export-windows, export-linux] needs: [export-windows, export-linux]
env: env:
STEAM_HOME: /root/steamcmd_data STEAM_HOME: /root/steamcmd_data
steps: steps:
# Need to install nodejs and git, and initalize git lfs for checkout - name: Install Dependencies
- name: Install node.js and git
run: | run: |
apt-get update sudo dpkg --add-architecture i386
apt-get install -y curl sudo apt-get update
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - sudo apt-get install -y --no-install-recommends \
apt-get install -y nodejs git git-lfs lib32gcc-s1 \
lib32stdc++6 \
curl \
nodejs \
git \
git-lfs
git lfs install git lfs install
- name: Setup SteamCMD
run: |
mkdir -p ~/steamcmd
curl -fsSL 'https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz' | tar xvzf - -C ~/steamcmd
# Run once to initialize
~/steamcmd/steamcmd.sh +quit
- name: Checkout - name: Checkout
uses: https://gitea.com/actions/checkout@v4 uses: https://gitea.com/actions/checkout@v4
with: with:
@ -122,7 +135,8 @@ jobs:
uses: https://gitea.com/actions/cache@v3 uses: https://gitea.com/actions/cache@v3
with: with:
path: | path: |
./steam_cache/ ~/steamcmd/config/
~/steamcmd/ssfn*
./steam_build_output/ ./steam_build_output/
key: steam-cache-${{ runner.os }}-${{ github.ref_name }} key: steam-cache-${{ runner.os }}-${{ github.ref_name }}
restore-keys: | restore-keys: |
@ -131,14 +145,12 @@ jobs:
- name: Read Cache - name: Read Cache
run: | run: |
mkdir -p ${{ env.STEAM_HOME }}/config # The Read Cache step is now handled by the actions/cache@v3 restore process.
cp ./steam_cache/config.vdf ${{ env.STEAM_HOME }}/config/ 2>/dev/null || echo "No cached config file" # This step can be removed or left for debugging.
cp ./steam_cache/ssfn* ${{ env.STEAM_HOME }}/ 2>/dev/null || echo "No cached sentry file" echo "Files in steamcmd directory:"
ls -la ~/steamcmd/
echo "Files in cache:" echo "Files in steamcmd config directory:"
ls -la ./steam_cache/ 2>/dev/null || echo "No cache directory" ls -la ~/steamcmd/config/
echo "Files in Steam directory:"
ls -la ${{ env.STEAM_HOME }}/ 2>/dev/null || echo "No Steam directory"
- name: Update VDF - name: Update VDF
run: | run: |
@ -150,23 +162,16 @@ jobs:
run: | run: |
cd $PROJECT_PATH cd $PROJECT_PATH
# Try without Steam Guard first (for cached auth) # Try without Steam Guard first (for cached auth)
/home/steam/steamcmd/steamcmd.sh +@sSteamCmdForcePlatformType linux +login "${{ vars.STEAM_BUILD_USERNAME }}" "${{ secrets.STEAM_BUILD_PASSWORD }}" +run_app_build "$PWD/build/build_dependencies/steam/app_build_2739610.vdf" +quit || { ~/steamcmd/steamcmd.sh +login "${{ vars.STEAM_BUILD_USERNAME }}" "${{ secrets.STEAM_BUILD_PASSWORD }}" +run_app_build "$PWD/build/build_dependencies/steam/app_build_2739610.vdf" +quit || {
echo "Login failed, trying with Steam Guard" echo "Login failed, trying with Steam Guard"
# If that fails, use Steam Guard in single session # If that fails, use Steam Guard in single session
/home/steam/steamcmd/steamcmd.sh +@sSteamCmdForcePlatformType linux +set_steam_guard_code "${{ secrets.STEAM_GUARD_CODE }}" +login "${{ vars.STEAM_BUILD_USERNAME }}" "${{ secrets.STEAM_BUILD_PASSWORD }}" +run_app_build "$PWD/build/build_dependencies/steam/app_build_2739610.vdf" +quit ~/steamcmd/steamcmd.sh +set_steam_guard_code "${{ secrets.STEAM_GUARD_CODE }}" +login "${{ vars.STEAM_BUILD_USERNAME }}" "${{ secrets.STEAM_BUILD_PASSWORD }}" +run_app_build "$PWD/build/build_dependencies/steam/app_build_2739610.vdf" +quit
} }
- name: Write Cache - name: Write Cache
run: | run: |
mkdir -p ./steam_cache # The Write Cache step is now handled by the actions/cache@v3 save process.
# This step can be removed or left for debugging.
# Debug: Show all files in the steam home directory echo "Files in steamcmd directory to be cached:"
echo "All files in ${{ env.STEAM_HOME }}:" ls -la ~/steamcmd/
find ${{ env.STEAM_HOME }} -type f -name "*" 2>/dev/null ls -la ~/steamcmd/config/
# Copy config file and sentry file to cache
cp ${{ env.STEAM_HOME }}/config/config.vdf ./steam_cache/ 2>/dev/null || echo "No config file to cache"
cp ${{ env.STEAM_HOME }}/ssfn* ./steam_cache/ 2>/dev/null || echo "No sentry file to cache"
echo "Files cached:"
ls -la ./steam_cache/ 2>/dev/null || echo "No cache directory"