[Fix]: added missing hidden import for linux and mac #8
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 & Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.11'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Build executable (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| pyinstaller --onefile --windowed --name PyGong --add-data "gongs;gongs" interval_timer.py | |
| - name: Build executable (macOS/Linux) | |
| if: runner.os != 'Windows' | |
| run: | | |
| pyinstaller --onefile --windowed --name PyGong --add-data "gongs:gongs" \ | |
| --hidden-import=PyQt6.QtCore \ | |
| --hidden-import=PyQt6.QtGui \ | |
| --hidden-import=PyQt6.QtWidgets \ | |
| --hidden-import=PyQt6.QtMultimedia \ | |
| --collect-all PyQt6 \ | |
| interval_timer.py | |
| - name: Rename Linux executable | |
| if: runner.os == 'Linux' | |
| run: | | |
| mv dist/PyGong dist/PyGong-linux | |
| - name: Rename macOS executable | |
| if: runner.os == 'macOS' | |
| run: | | |
| mv dist/PyGong dist/PyGong-macos | |
| - name: Upload artifacts (Windows) | |
| if: runner.os == 'Windows' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: PyGong-windows | |
| path: dist/PyGong.exe | |
| - name: Upload artifacts (macOS) | |
| if: runner.os == 'macOS' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: PyGong-macos | |
| path: dist/PyGong-macos | |
| - name: Upload artifacts (Linux) | |
| if: runner.os == 'Linux' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: PyGong-linux | |
| path: dist/PyGong-linux | |
| release: | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download Windows artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: PyGong-windows | |
| path: dist | |
| - name: Download macOS artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: PyGong-macos | |
| path: dist | |
| - name: Download Linux artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: PyGong-linux | |
| path: dist | |
| - name: List artifacts | |
| run: | | |
| ls -lah dist/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: dist/* | |
| draft: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |