This repository was archived by the owner on Dec 27, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (53 loc) · 2.55 KB
/
Build.yml
File metadata and controls
71 lines (53 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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 }}\Files\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 }}\Files\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 }}\Files\Zotify && Move-Item -Path dist\__main__.exe -Destination bin\${{ env.Architecture }}\${{ matrix.configuration }}\${{ env.DotNetVersion }}\Files\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 }}