Skip to content

Commit

Permalink
Merge pull request #1 from Myakui/main
Browse files Browse the repository at this point in the history
Fix release
  • Loading branch information
kdavjd authored Nov 21, 2024
2 parents ebe395b + 99e4c99 commit 2601a3b
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Release EXE
on:
push:
branches: [ "main" ]
workflow_dispatch: # Добавьте это событие для ручного запуска

permissions:
contents: write
Expand All @@ -28,7 +29,13 @@ jobs:
python -m pip install --upgrade pip
pip install poetry
poetry install
# 4. Set PYTHONPATH and Install Pyqt
- name: Set PYTHONPATH and Install Pyqt
run: |
set PYTHONPATH=%GITHUB_WORKSPACE%\PIDSimulations
pip install pyqt6
# 4. Install PyInstaller
- name: Install PyInstaller
run: |
Expand All @@ -37,7 +44,21 @@ jobs:
# 5. Build the executable with PyInstaller
- name: Build executable with PyInstaller
run: |
poetry run pyinstaller src/gui/main.py --onefile --name main.exe
pyinstaller src/gui/main.py --onefile --name pid-sim.exe --paths "C:\\hostedtoolcache\\windows\\Python\\3.12.7\\x64\\Lib\\site-packages\\PyQt6\\Qt6\\plugins;PyQt6/Qt6/plugins" --clean
# 6. Verify the build (optional)
- name: Verify executable
run: |
if (!(Test-Path "dist\pid-sim.exe")) {
Write-Error "Executable not found!"
exit 1
}
# 7. Display directory structure for debugging (optional)
- name: Display directory structure
run: |
dir dist
shell: cmd

# 8. Create Release and Upload EXE
- name: Create Release and Upload EXE
Expand All @@ -47,4 +68,4 @@ jobs:
tag_name: "release-${{ github.run_number }}"
files: "dist/pid-sim.exe"
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}

0 comments on commit 2601a3b

Please sign in to comment.