Skip to content

Commit

Permalink
update and fix the path and working dir issue
Browse files Browse the repository at this point in the history
  • Loading branch information
elkanamol committed Sep 1, 2024
1 parent b271804 commit 41ebf02
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/Build_Executable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ jobs:
create-executable-and-release:
runs-on: windows-latest
permissions:
contents: write #allows the job to create a release
contents: write
defaults:
run:
working-directory: .

steps:
- name: Checkout code
Expand All @@ -31,11 +34,15 @@ jobs:
run: pip install -U pyinstaller

- name: Compile executable
working-directory: . # again, app directory here or skip if root
run: pyinstaller --onefile --name sierra-status --hidden-import=serial --hidden-import=argparse --hidden-import=importlib.metadata --clean --windowed .\sierra_status\src\cli.py #or whatever your main file is named

run: |
$env:PYTHONPATH = "$env:GITHUB_WORKSPACE;$env:PYTHONPATH"
pyinstaller --onefile --name sierra-status --hidden-import=serial --hidden-import=argparse --hidden-import=importlib.metadata --add-data "sierra_status:sierra_status" --clean --windowed .\sierra_status\src\cli.py
- name: Release
uses: softprops/action-gh-release@v2
with:
files: dist/sierra-status.exe
tag_name: ${{ inputs.tag }}

- name: Print directory structure
run: |
Get-ChildItem -Recurse

0 comments on commit 41ebf02

Please sign in to comment.