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 and Package EECT-Update | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| inputs: | |
| build-type: | |
| description: 'Build type (Release/Debug)' | |
| required: false | |
| default: 'Release' | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Cache Python dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~\AppData\Local\pip\Cache | |
| key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}- | |
| ${{ runner.os }}-python- | |
| ${{ runner.os }}- | |
| - name: Cache Nuitka Dependency Walker | |
| uses: actions/cache@v4 | |
| with: | |
| path: C:\Users\runneradmin\AppData\Local\Nuitka\Nuitka\Cache\downloads\depends\x86_64 | |
| key: ${{ runner.os }}-nuitka-depends-cache-v1 | |
| restore-keys: | | |
| ${{ runner.os }}-nuitka-depends-cache- | |
| env: | |
| NUITKA_DOWNLOAD_DEPENDS: "yes" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Build with Nuitka | |
| uses: Nuitka/Nuitka-Action@v1.2 | |
| with: | |
| script-name: main.py | |
| output-file: EECT-Update | |
| onefile: true | |
| standalone: true | |
| windows-console-mode: force | |
| - name: Zip the build artifact | |
| run: | | |
| dir '.\build\main.dist\*' | |
| Compress-Archive -Path '.\build\main.dist\*' -DestinationPath 'EECT-Update_build.zip' -Force | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: EECT-Update_build.zip | |
| path: EECT-Update_build.zip |