Skip to content

Commit

Permalink
Added optimizations to the build.yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
travisvn committed Dec 17, 2024
1 parent ef2a229 commit b4e797b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,18 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pyinstaller pathspec pyperclip
if [ "${{ matrix.os }}" != "windows-latest" ]; then
sudo apt-get update && sudo apt-get install -y upx
fi
# Build binary with PyInstaller
# Build binary with PyInstaller and optimize
- name: Build executable with PyInstaller
run: |
pyinstaller --onefile --name gptree cli_tool_gptree/main.py
if [ "${{ matrix.os }}" = "windows-latest" ]; then
pyinstaller --onefile --noconsole --name gptree.exe cli_tool_gptree/main.py
else
pyinstaller --onefile --noconsole --name gptree --upx-dir=/usr/bin --no-lzma cli_tool_gptree/main.py
fi
# Rename binaries for platform-specific names
- name: Rename binaries for upload
Expand Down Expand Up @@ -90,6 +97,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Update Homebrew Tap Formula
- name: Update Homebrew Tap Formula
run: |
# Clone the Homebrew tap repository
Expand Down

0 comments on commit b4e797b

Please sign in to comment.