mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
84 lines
2.2 KiB
YAML
84 lines
2.2 KiB
YAML
name: Build Assets
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs.cdn_branch }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
DEPOT_DOWNLOADER_USERNAME: ${{ secrets.DEPOT_DOWNLOADER_USERNAME }}
|
|
DEPOT_DOWNLOADER_PASSWORD: ${{ secrets.DEPOT_DOWNLOADER_PASSWORD }}
|
|
STEAM_OS: windows
|
|
STEAM_APP: 3341250
|
|
STEAM_DEPOT: 3341251
|
|
|
|
jobs:
|
|
download_client:
|
|
name: Download client
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
token: ${{ secrets.GH_TOKEN }}
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 9.0
|
|
|
|
- name: Restore
|
|
run: |
|
|
cd src/CLI
|
|
dotnet restore
|
|
|
|
- name: Setup DepotDownloader
|
|
run: |
|
|
mkdir -p temp
|
|
|
|
echo "Downloading..."
|
|
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/SteamRE/DepotDownloader/releases/latest | \
|
|
grep -i "linux-x64" | \
|
|
grep "browser_download_url" | \
|
|
cut -d '"' -f 4)
|
|
curl -L "$DOWNLOAD_URL" -o temp/depotDownloader.zip
|
|
|
|
echo "Unzipping..."
|
|
unzip temp/depotDownloader.zip -d temp/depotDownloader
|
|
|
|
echo "Download complete; files:"
|
|
ls temp/depotDownloader
|
|
|
|
- name: Download client
|
|
run: |
|
|
chmod +x temp/depotDownloader/DepotDownloader
|
|
temp/depotDownloader/DepotDownloader \
|
|
-username "${{ env.DEPOT_DOWNLOADER_USERNAME }}" \
|
|
-password "${{ env.DEPOT_DOWNLOADER_PASSWORD }}" \
|
|
-os ${{ env.STEAM_OS }} \
|
|
-app ${{ env.STEAM_APP }} \
|
|
-depot ${{ env.STEAM_DEPOT }} \
|
|
-dir temp/depots
|
|
|
|
- name: Unpack
|
|
run: |
|
|
cd temp/depots/${{ env.STEAM_APP }}
|
|
|
|
SUBDIR_COUNT=$(ls | wc -l)
|
|
if [ "$SUBDIR_COUNT" -ne 1 ]; then
|
|
echo "Error: Expected exactly 1 subdirectory, found $SUBDIR_COUNT"
|
|
exit 1
|
|
fi
|
|
|
|
DEPOT_BRANCH_BUILD_ID=$(ls)
|
|
echo "Found build ID: $DEPOT_BRANCH_BUILD_ID"
|
|
|
|
cd ../../../src/CLI
|
|
|
|
dotnet run unpack ../../temp/depots/${{ env.STEAM_APP }}/$DEPOT_BRANCH_BUILD_ID/
|