-
Notifications
You must be signed in to change notification settings - Fork 0
Replace CI stubs with SteamCMD game DLL download #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
45a9bc0
Initial plan
Copilot 9848718
Replace CI stub-based builds with SteamCMD game DLL download
Copilot f90bb80
Update .github/workflows/setup-game-dlls.yml
Brollyy ee22cb5
Update .github/workflows/release-new-version.yml
Brollyy a391331
Update .github/workflows/release-new-version.yml
Brollyy 0f9ecde
Fix CI build and analyzer failures; address review comments
Copilot 3f95343
Apply suggestion from @Brollyy
Brollyy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| name: Setup Game DLLs | ||
|
|
||
| on: | ||
| workflow_call: | ||
| secrets: | ||
| STEAM_USERNAME: | ||
| required: true | ||
| STEAM_PASSWORD: | ||
| required: true | ||
|
|
||
| jobs: | ||
| download-dlls: | ||
| runs-on: ubuntu-latest | ||
| permissions: {} | ||
|
|
||
| steps: | ||
| - name: Restore game DLLs from cache | ||
| id: cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/bits-and-bops/Bits & Bops_Data/Managed | ||
| key: bits-and-bops-1929290-managed-${{ runner.os }}-v1 | ||
| restore-keys: bits-and-bops-1929290-managed-${{ runner.os }}- | ||
|
|
||
| - name: Download game DLLs using SteamCMD | ||
| env: | ||
| STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} | ||
| STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| # Skip download if DLLs are already cached | ||
| if [ -d "$HOME/bits-and-bops/Bits & Bops_Data/Managed" ] && [ -n "$(ls -A "$HOME/bits-and-bops/Bits & Bops_Data/Managed" 2>/dev/null)" ]; then | ||
| echo "Game DLLs found in cache, skipping download" | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [ -z "$STEAM_USERNAME" ] || [ -z "$STEAM_PASSWORD" ]; then | ||
| echo "Error: STEAM_USERNAME and STEAM_PASSWORD secrets are not set" | ||
| echo "Configure Steam credentials in repository secrets:" | ||
| echo "1. Go to Settings > Secrets and variables > Actions" | ||
| echo "2. Add STEAM_USERNAME and STEAM_PASSWORD" | ||
| echo "" | ||
| echo "IMPORTANT: Use a dedicated Steam account WITHOUT 2FA/Steam Guard enabled." | ||
| echo "SteamCMD cannot handle 2FA in automated environments." | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Install SteamCMD | ||
| mkdir -p ~/steamcmd | ||
| cd ~/steamcmd | ||
| curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf - | ||
|
|
||
| GAME_DIR="$HOME/bits-and-bops" | ||
| mkdir -p "$GAME_DIR" | ||
|
|
||
| # Download Bits & Bops (App ID: 1929290) | ||
| # NOTE: This will FAIL if the Steam account has 2FA/Steam Guard enabled | ||
| echo "Downloading Bits & Bops from Steam..." | ||
| ./steamcmd.sh +force_install_dir "$GAME_DIR" \ | ||
| +login "$STEAM_USERNAME" "$STEAM_PASSWORD" \ | ||
| +app_update 1929290 validate \ | ||
| +quit | ||
|
|
||
| echo "Game DLLs downloaded successfully" | ||
| ls "$GAME_DIR/Bits & Bops_Data/Managed/" | wc -l | ||
| echo "DLLs found in managed directory" | ||
|
|
||
| - name: Upload game DLLs as artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: game-dlls | ||
| path: ~/bits-and-bops/Bits & Bops_Data/Managed | ||
| retention-days: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.