From 9fa2f6fb9ed65fd08a126fd58db18cbe8407caab Mon Sep 17 00:00:00 2001 From: WorldTeacher Date: Thu, 10 Oct 2024 17:55:38 +0200 Subject: [PATCH] upload workflow --- .gitea/workflows/windows_build.yaml | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflows/windows_build.yaml diff --git a/.gitea/workflows/windows_build.yaml b/.gitea/workflows/windows_build.yaml new file mode 100644 index 0000000..d516e50 --- /dev/null +++ b/.gitea/workflows/windows_build.yaml @@ -0,0 +1,31 @@ +on: + push: + branches: + - main + +jobs: + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.12.5 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pyinstaller + + # Step 4: Build the executable using PyInstaller + - name: Build with PyInstaller + run: | + pyinstaller --noconfirm --onedir --windowed --icon "icons/1490971308-map-icons-7_82746.ico" --name "LibrarySystem" --clean --add-data "config;config/" --add-data "icons;icons/" main.py + + # Step 5: Upload the artifact (the built executable) + - name: Upload Build Artifacts + uses: actions/upload-artifact@v3 + with: + name: LibrarySystemExecutable + path: ./dist/LibrarySystem \ No newline at end of file