fixed mistake in CI #7
Workflow file for this run
This file contains 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: Package Application with Pyinstaller | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build-console-win64: | |
runs-on: windows-latest | |
steps: | |
- name: (Install) python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
architecture: "x64" | |
- name: (Install) python dev tools | |
shell: bash | |
run: python -m pip install pip wheel setuptools | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: (Install) dependencies | |
run: python -m pip install -r "requirements_win64.txt" | |
shell: bash | |
- name: (Install) pyinstaller | |
shell: bash | |
run: pip install pyinstaller | |
- name: (Create) Executable | |
shell: bash | |
run: | | |
pyinstaller \ | |
--clean \ | |
--noconfirm \ | |
--onedir \ | |
--name "RoK Tracker (Console)" \ | |
rok_scanner.py | |
echo "✔️ Executable created successfully" >> $GITHUB_STEP_SUMMARY | |
echo " - Python version used: '3.11'" >> $GITHUB_STEP_SUMMARY | |
echo " - Python architecture used: 'x64'" >> $GITHUB_STEP_SUMMARY | |
- name: Prepare executable for upload | |
run: | | |
cp "config.json" "dist/RoK Tracker (Console)/config.json" | |
mkdir "dist/RoK Tracker (Console)/deps" | |
cp -r "deps/inputs/" "dist/RoK Tracker (Console)/deps/" | |
tar.exe -a -c -f "RoK Tracker (Console).zip" -C "dist/" "RoK Tracker (Console)" | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: RoK Tracker (Console) | |
path: "RoK Tracker (Console).zip" | |
build-gui-win64: | |
runs-on: windows-latest | |
steps: | |
- name: (Install) python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
architecture: "x64" | |
- name: (Install) python dev tools | |
shell: bash | |
run: python -m pip install pip wheel setuptools | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: (Install) dependencies | |
run: python -m pip install -r "requirements_win64.txt" | |
shell: bash | |
- name: Get customtkinter folder | |
id: ctk-path | |
run: | | |
echo "CTKPATH=$(python -c "import customtkinter as _; print(_.__path__[0].replace('\\', '/'))")" >> $env:GITHUB_OUTPUT | |
- name: (Install) pyinstaller | |
shell: bash | |
run: pip install pyinstaller | |
- name: (Create) Executable | |
shell: bash | |
run: | | |
pyinstaller \ | |
--clean \ | |
--noconfirm \ | |
--onedir \ | |
--name "RoK Tracker (GUI)" \ | |
--windowed \ | |
--add-data "${{ steps.ctk-path.outputs.CTKPATH }};customtkinter/" \ | |
graphic_scanner.py | |
echo "✔️ Executable created successfully" >> $GITHUB_STEP_SUMMARY | |
echo " - Python version used: '3.11'" >> $GITHUB_STEP_SUMMARY | |
echo " - Python architecture used: 'x64'" >> $GITHUB_STEP_SUMMARY | |
- name: Prepare executable for upload | |
run: | | |
cp "config.json" "dist/RoK Tracker (GUI)/config.json" | |
mkdir "dist/RoK Tracker (GUI)/deps" | |
cp -r "deps/inputs/" "dist/RoK Tracker (GUI)/deps/" | |
tar.exe -a -c -f "RoK Tracker (GUI).zip" -C "dist/" "RoK Tracker (GUI)" | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: RoK Tracker (GUI) | |
path: "RoK Tracker (GUI).zip" | |
release: | |
runs-on: ubuntu-latest | |
needs: | |
- build-console-win64 | |
- build-gui-win64 | |
steps: | |
- name: Get console executable | |
uses: actions/download-artifact@v3 | |
with: | |
name: RoK Tracker (Console) | |
- name: Get GUI executable | |
uses: actions/download-artifact@v3 | |
with: | |
name: RoK Tracker (GUI) | |
- name: Release | |
uses: softprops/[email protected] | |
with: | |
files: | | |
RoK Tracker (GUI).zip | |
RoK Tracker (Console).zip |