guard: lock CB affinity survival pattern so it can't be re-broken #255
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: Compile Python to EXE and Create Dynamic Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyinstaller | |
| pip install -r requirements.txt | |
| - name: Install Resource Hacker | |
| run: | | |
| curl -L -o reshacker_setup.exe "https://www.angusj.com/resourcehacker/reshacker_setup.exe" | |
| Start-Process -FilePath .\reshacker_setup.exe -ArgumentList '/VERYSILENT', '/DIR="C:\Program Files\Resource Hacker"' -Wait | |
| - name: Generate DailyQuests Manifest | |
| run: | | |
| sed 's/{{EXE_NAME}}/DailyQuests/' admin_template.manifest > admin_dailyquests.manifest | |
| - name: Generate PyAutoRaid Manifest | |
| run: | | |
| sed 's/{{EXE_NAME}}/PyAutoRaid/' admin_template.manifest > admin_pyautoraid.manifest | |
| - name: Generate PARInstaller Manifest | |
| run: | | |
| sed 's/{{EXE_NAME}}/PARInstaller/' admin_template.manifest > admin_parinstaller.manifest | |
| - name: Compile DailyQuests to EXE with Icon and Data | |
| run: | | |
| python -m PyInstaller --onefile -w --icon=assets/Icons/image0.ico --hidden-import=pyautogui --hidden-import=pyscreeze --hidden-import=Pillow --hidden-import=pywin32 --hidden-import=psutil --hidden-import=PyGetWindow --hidden-import=requests --hidden-import=screeninfo --hidden-import=ttkthemes --hidden-import=cv2 --add-data "assets;assets" Modules/DailyQuests.py | |
| - name: Compile PyAutoRaid to EXE with Icon and Data | |
| run: | | |
| python -m PyInstaller --onefile -w --icon=assets/Icons/image1.ico --hidden-import=pyautogui --hidden-import=pyscreeze --hidden-import=Pillow --hidden-import=pywin32 --hidden-import=psutil --hidden-import=PyGetWindow --hidden-import=requests --hidden-import=screeninfo --hidden-import=ttkthemes --hidden-import=cv2 --add-data "assets;assets" Modules/PyAutoRaid.py | |
| - name: Embed Manifest into DailyQuests | |
| run: | | |
| & "C:\Program Files\Resource Hacker\ResourceHacker.exe" -open dist\DailyQuests.exe -save dist\DailyQuests.exe -action addoverwrite -res admin_dailyquests.manifest -mask MANIFEST,1 | |
| - name: Embed Manifest into PyAutoRaid | |
| run: | | |
| & "C:\Program Files\Resource Hacker\ResourceHacker.exe" -open dist\PyAutoRaid.exe -save dist\PyAutoRaid.exe -action addoverwrite -res admin_pyautoraid.manifest -mask MANIFEST,1 | |
| - name: Install Inno Setup | |
| run: | | |
| choco install innosetup --yes | |
| - name: Generate Installer with Inno Setup | |
| run: | | |
| & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" setup.iss | |
| - name: Increment Version | |
| id: increment_version | |
| run: | | |
| new_version=$(python increment_version.py) | |
| echo "new_version=$new_version" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Create GitHub Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.increment_version.outputs.new_version }} | |
| release_name: Release ${{ steps.increment_version.outputs.new_version }} | |
| body: | | |
| Compiled installer for the latest release. | |
| draft: false | |
| prerelease: false | |
| - name: Upload Installer to Release | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: PARinstaller.exe | |
| asset_name: PARinstaller.exe | |
| asset_content_type: application/octet-stream |