Update DisplayKeys-IS.py #162
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
#################################################################################################################### | |
# This Action exists solely for development and testing changes. | |
# If you want to create a release build, use the "DisplayKeys-IS Release" action instead. | |
# | |
# It is still automated to create a build when changes are merged to 'main' however, in order to ensure | |
# that any such changes are indeed working. | |
#################################################################################################################### | |
name: DisplayKeys-IS Main | |
# Trigger Build on: | |
on: | |
push: | |
branches: [ "Development" ] | |
paths-ignore: | |
- "../README.md" | |
- "./workflows/main.yml" | |
- "./workflows/release.yml" | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Actions project permission | |
permissions: write-all | |
#Individual Tasks to fullfill, to create artifact | |
jobs: | |
py_to_exe: | |
runs-on: windows-latest | |
env: | |
# Packaging Command Variables | |
Application_File_Path: ${{ github.workspace }}/ProjectFiles/DisplayKeys-IS.py | |
Application_Title: "DisplayKeys-IS" | |
Application_Icon_Path: ${{ github.workspace }}/ProjectFiles/assets/DisplayKeys-IS.ico | |
Artifact_Save_Dir: ${{ github.workspace }}/ProjectFiles/dist/ | |
Full_Artifact_Save_Path: "${{ github.workspace }}/ProjectFiles/dist/DisplayKeys-IS.exe" | |
Packaging_Add_Icon: "${{ github.workspace }}/ProjectFiles/assets/DisplayKeys-IS.ico;." | |
Packaging_Add_Preview: "${{ github.workspace }}/ProjectFiles/assets/Preview.png;." | |
Packaging_Add_Help: "${{ github.workspace }}/ProjectFiles/assets/Help.png;." | |
Packaging_Add_Versioning: ${{ github.workspace }}/ProjectFiles/config/version.txt | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r ${{ github.workspace }}/ProjectFiles/config/requirements.txt | |
- name: Create EXE file | |
run: | | |
# Command parameters for creating the .EXE file | |
pyinstaller $env:Application_File_Path --onefile --noconsole --debug all --name $env:Application_Title --distpath $env:Artifact_Save_Dir --icon $env:Application_Icon_Path --add-data $env:Packaging_Add_Icon --add-data $env:Packaging_Add_Preview --add-data $env:Packaging_Add_Help --version-file $env:Packaging_Add_Versioning | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: DisplayKeys-IS | |
path: ${{ env.Full_Artifact_Save_path }} |