Build Windows Executable with PyInstaller #36
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 Executable with PyInstaller | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| runs-on: windows-2022 | |
| permissions: | |
| contents: write # Grants write access to repository contents for this job only | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' # Specify your desired Python version | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyinstaller requests | |
| # If you have a requirements.txt file: | |
| # Install requirements later, as may make binary smaller | |
| #pip install -r requirements.txt | |
| # Do this first, as has less dependencies | |
| - name: Package BrowseApplication with PyInstaller | |
| run: | | |
| # Replace 'your_script.py' with your main Python script or 'your_app.spec' if using a spec file | |
| pyinstaller -F BrowseRoyalCaribbeanPrice.py | |
| - name: upload windows artifact | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: D:\a\CheckRoyalCaribbeanPrice\CheckRoyalCaribbeanPrice\dist\BrowseRoyalCaribbeanPrice.exe | |
| asset_name: BrowseRoyalCaribbeanPrice.exe | |
| asset_content_type: application/exe | |
| - name: Package Application with PyInstaller | |
| run: | | |
| # Replace 'your_script.py' with your main Python script or 'your_app.spec' if using a spec file | |
| pip install Apprise bs4 | |
| pyinstaller -F --collect-all apprise --collect-all bs4 CheckRoyalCaribbeanPrice.py | |
| - name: upload windows artifact | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: D:\a\CheckRoyalCaribbeanPrice\CheckRoyalCaribbeanPrice\dist\CheckRoyalCaribbeanPrice.exe | |
| asset_name: CheckRoyalCaribbeanPrice.exe | |
| asset_content_type: application/exe | |