2.0.0b5 #3
This file contains 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 workflow will create game artifacts used in the awpy Python library | |
name: artifacts | |
env: | |
SOURCE2_VERSION: 11.1 | |
SOURCE2_VIEWER_URL: https://github.com/ValveResourceFormat/ValveResourceFormat/releases/download/11.1/cli-windows-x64.zip | |
PYTHON_VERSION: 3.13 | |
STEAMCMD_URL: https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip | |
CS2_APP_ID: 730 | |
CS2_INSTALL_DIR: ${{ github.workspace }}/cs2 | |
on: | |
pull_request: | |
branches: [main] | |
paths: | |
- "awpy/**" | |
- "tests/**" | |
- "pyproject.toml" | |
jobs: | |
generate-artifacts: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout awpy library | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Set up Python | |
run: | | |
uv python install ${{ env.PYTHON_VERSION }} | |
- name: Install awpy | |
shell: bash | |
run: | | |
uv sync --group dev --group test | |
uv tool install . | |
- name: Install SteamCMD | |
run: | | |
curl -sSL ${{ env.STEAMCMD_URL }} -o steamcmd.zip | |
tar -xf steamcmd.zip -C ${{ github.workspace }} | |
echo "SteamCMD installed." | |
- name: Log in to Steam and Download CS2 | |
run: | | |
# Navigate to SteamCMD directory | |
cd ${{ github.workspace }} | |
./steamcmd.exe +login ${{ secrets.STEAM_USERNAME }} ${{ secrets.STEAM_PASSWORD }} \ | |
+force_install_dir "${{ env.CS2_INSTALL_DIR }}" \ | |
+app_update ${{ env.CS2_APP_ID }} validate \ | |
+quit | |
echo "CS2 downloaded to ${{ env.CS2_INSTALL_DIR }}." | |
- name: Get Source2ViewerCLI | |
run: | | |
curl -L -o cli-windows-x64.zip ${{ env.SOURCE2_VIEWER_URL }} | |
tar -xf cli-windows-x64.zip -C ${{ github.workspace }} | |
echo "Executable downloaded and extracted." |