diff --git a/.github/workflows/build_artifacts.yaml b/.github/workflows/build_artifacts.yaml new file mode 100644 index 0000000..9b8c8a5 --- /dev/null +++ b/.github/workflows/build_artifacts.yaml @@ -0,0 +1,33 @@ +name: Build artifacts + +on: + workflow_dispatch: + inputs: + directory: + description: 'Directory to run Docker command in' + required: true + default: '.' + +jobs: + build-windows: + runs-on: + - ubuntu-latest + container: + image: batonogov/pyinstaller-windows:latest + options: --rm + volumes: + - ${{ github.workspace }}:/src/ + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Run PyInstaller + run: | + pyinstaller BTClockOTA.spec + + - name: Archive artifacts + uses: actions/upload-artifact@v4 + with: + name: windows-artifacts + path: dist/ diff --git a/BTClockOTA.spec b/BTClockOTA.spec index bbab98f..9964ae8 100644 --- a/BTClockOTA.spec +++ b/BTClockOTA.spec @@ -6,7 +6,7 @@ a = Analysis( pathex=[], binaries=[], datas=[], - hiddenimports=['zeroconf._utils.ipaddress', 'zeroconf._handlers.answers'], + hiddenimports=['zeroconf._utils.ipaddress', 'zeroconf._handlers.answers', 'pyserial'], hookspath=[], hooksconfig={}, runtime_hooks=[], @@ -19,13 +19,16 @@ pyz = PYZ(a.pure) exe = EXE( pyz, a.scripts, + a.binaries, + a.datas, [], - exclude_binaries=True, name='BTClockOTA', debug=False, bootloader_ignore_signals=False, strip=False, upx=True, + upx_exclude=[], + runtime_tmpdir=None, console=False, disable_windowed_traceback=False, argv_emulation=False, @@ -34,18 +37,3 @@ exe = EXE( entitlements_file=None, icon=['update-icon.icns'], ) -coll = COLLECT( - exe, - a.binaries, - a.datas, - strip=False, - upx=True, - upx_exclude=[], - name='BTClockOTA', -) -app = BUNDLE( - coll, - name='BTClockOTA.app', - icon='update-icon.icns', - bundle_identifier=None, -)