7.11 show status fix included #5
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 Executable | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| workflow_dispatch: # Allows manual triggering from GitHub UI | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Find cterasdk location and build executable | |
| run: | | |
| $cterasdk_path = python -c "import cterasdk; import os; print(os.path.dirname(cterasdk.__file__))" | |
| echo "cterasdk path: $cterasdk_path" | |
| pyinstaller --name ctools --onefile --windowed --add-data "$cterasdk_path;cterasdk" ctools.py | |
| - name: List dist contents | |
| run: | | |
| dir dist | |
| - name: Upload executable | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ctools-windows-exe | |
| path: dist/ctools.exe | |
| retention-days: 90 | |
| - name: Create Release (on tag push) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: dist/ctools.exe | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |