This repository was archived by the owner on Dec 27, 2025. It is now read-only.
Build CatBot Full #63
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
| name: Build CatBot Full | |
| on: workflow_dispatch | |
| jobs: | |
| build-catbot-full: | |
| name: Build CatBot with Zotify, ffmpeg, yt-dlp and spotdl | |
| strategy: | |
| matrix: | |
| configuration: [Debug, Release] | |
| runs-on: windows-latest | |
| env: | |
| SolutionName: CatBot.sln | |
| Architecture: x86 | |
| DotNetVersion: net9.0-windows10.0.22000.0 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup MSBuild.exe | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Setup NuGet | |
| uses: nuget/setup-nuget@v2 | |
| - name: Setup Python environment | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| - name: Clone Zotify repository | |
| run: git clone --single-branch --branch v1.0-dev https://github.com/zotify-dev/zotify.git | |
| - name: Download yt-dlp executable | |
| run: New-Item -ItemType Directory -Path bin\${{ env.Architecture }}\${{ matrix.configuration }}\${{ env.DotNetVersion }}\yt-dlp && Invoke-WebRequest https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe -OutFile bin\${{ env.Architecture }}\${{ matrix.configuration }}\${{ env.DotNetVersion }}\yt-dlp\yt-dlp.exe | |
| - name: Install PyInstaller | |
| run: pip install -U pyinstaller | |
| - name: Install required libraries | |
| run: pip install -r zotify/requirements.txt && pip install git+https://github.com/kokarare1212/librespot-python | |
| - name: Restore the application | |
| run: msbuild $env:SolutionName /t:Restore /p:Configuration=$env:Configuration | |
| env: | |
| Configuration: ${{ matrix.configuration }} | |
| - name: Restore NuGet Packages | |
| run: nuget restore $env:SolutionName | |
| - name: Build solution | |
| run: msbuild $env:SolutionName /t:rebuild /p:Configuration=$env:Configuration | |
| env: | |
| Configuration: ${{ matrix.configuration }} | |
| - name: Run PyInstaller | |
| run: pyinstaller --onefile -F zotify\zotify\__main__.py | |
| - name: Move Zotify to output folder | |
| run: New-Item -ItemType Directory -Path bin\${{ env.Architecture }}\${{ matrix.configuration }}\${{ env.DotNetVersion }}\Zotify && Move-Item -Path dist\__main__.exe -Destination bin\${{ env.Architecture }}\${{ matrix.configuration }}\${{ env.DotNetVersion }}\Zotify\Zotify.exe | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: CatBot_${{ matrix.configuration }} | |
| path: bin/${{ env.Architecture }}/${{ matrix.configuration }}/${{ env.DotNetVersion }} |