Skip to content

Commit 308e7e3

Browse files
committed
Add custom icon to PyInstaller builds
Updated the PyInstaller commands in the CI workflow to include a custom icon (`docs/_static/favicon.ico`) for all binary builds. This ensures the binaries have a consistent branding across platforms.
1 parent 68800be commit 308e7e3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ jobs:
111111

112112
- name: Publish to PyPI
113113
uses: pypa/gh-action-pypi-publish@release/v1
114+
114115
build-binaries:
115116
needs: test
116117
if: startsWith(github.ref, 'refs/tags/v')
@@ -138,7 +139,8 @@ jobs:
138139
os_name: windows
139140
arch: arm64
140141
python-version: "3.12"
141-
cross_compile: true # macOS architectures
142+
cross_compile: true
143+
# macOS architectures
142144
- os: macos-13 # Intel-based runner
143145
os_name: macos
144146
arch: x86_64
@@ -173,7 +175,7 @@ jobs:
173175
174176
- name: Build binary
175177
run: |
176-
python -m PyInstaller --onefile --name tzst --console src/main.py
178+
python -m PyInstaller --onefile --name tzst --console --icon docs/_static/favicon.ico src/main.py
177179
178180
- name: Verify binary (Linux/macOS)
179181
if: matrix.os != 'windows-latest'
@@ -194,12 +196,12 @@ jobs:
194196
- name: Build binary for ARM64 on macOS
195197
if: matrix.os == 'macos-14' && matrix.arch == 'arm64'
196198
run: |
197-
python -m PyInstaller --onefile --name tzst --console --target-arch arm64 src/main.py
199+
python -m PyInstaller --onefile --name tzst --console --target-arch arm64 --icon docs/_static/favicon.ico src/main.py
198200
199201
- name: Build binary for ARM64 on Windows
200202
if: matrix.os == 'windows-latest' && matrix.arch == 'arm64'
201203
run: |
202-
python -m PyInstaller --onefile --name tzst --console --target-arch arm64 src/main.py
204+
python -m PyInstaller --onefile --name tzst --console --target-arch arm64 --icon docs/_static/favicon.ico src/main.py
203205
204206
- name: Setup cross-compilation for Linux ARM64
205207
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'aarch64'
@@ -212,7 +214,7 @@ jobs:
212214
env:
213215
CC: aarch64-linux-gnu-gcc
214216
run: |
215-
python -m PyInstaller --onefile --name tzst --console --target-arch aarch64 src/main.py
217+
python -m PyInstaller --onefile --name tzst --console --target-arch aarch64 --icon docs/_static/favicon.ico src/main.py
216218
217219
- name: Prepare archive contents (Linux/macOS)
218220
if: matrix.os != 'windows-latest'

0 commit comments

Comments
 (0)