Library card: refresh "Downloaded" pill after install folder set #41
Workflow file for this run
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 Windows installer | |
| on: | |
| push: | |
| branches: [main, master] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main, master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write # needed for softprops/action-gh-release on tag builds | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| timeout-minutes: 90 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| cache: pip | |
| - name: Install Python dependencies | |
| shell: pwsh | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install nuitka ordered-set | |
| - name: Cache Nuitka compile cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/AppData/Local/Nuitka | |
| key: nuitka-${{ runner.os }}-py313-${{ hashFiles('requirements.txt', 'run_app.py', 'library/**/*.py', 'DLib/**/*.py', 'build/build.py') }} | |
| restore-keys: | | |
| nuitka-${{ runner.os }}-py313- | |
| - name: Build standalone bundle with Nuitka | |
| shell: pwsh | |
| run: python build/build.py --clean | |
| - name: Normalize dist folder name (run_app.dist -> DLib.dist) | |
| shell: pwsh | |
| run: | | |
| if (Test-Path build/dist/DLib.dist) { Remove-Item -Recurse -Force build/dist/DLib.dist } | |
| if (Test-Path build/dist/run_app.dist) { | |
| Rename-Item -Path build/dist/run_app.dist -NewName DLib.dist | |
| } | |
| if (-not (Test-Path build/dist/DLib.dist/DLib.exe)) { | |
| throw "DLib.exe not found after build" | |
| } | |
| - name: Install Inno Setup | |
| shell: pwsh | |
| run: | | |
| choco install innosetup --no-progress --yes | |
| $iscc = "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" | |
| if (-not (Test-Path $iscc)) { throw "ISCC not found at $iscc" } | |
| "ISCC=$iscc" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| - name: Compile installer | |
| shell: pwsh | |
| run: | | |
| & "$env:ISCC" build/dlib.iss | |
| Get-ChildItem build/dist/Setup-DLib-*.exe | |
| - name: Upload installer artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DLib-Setup | |
| path: build/dist/Setup-DLib-*.exe | |
| if-no-files-found: error | |
| retention-days: 30 | |
| - name: Upload portable bundle | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DLib-portable-bundle | |
| path: build/dist/DLib.dist/ | |
| if-no-files-found: error | |
| retention-days: 14 | |
| - name: Attach to GitHub Release (tag pushes only) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: build/dist/Setup-DLib-*.exe | |
| fail_on_unmatched_files: true | |
| generate_release_notes: true |