Skip to content

Mise à jour pour utiliser un autre port #4

Mise à jour pour utiliser un autre port

Mise à jour pour utiliser un autre port #4

Workflow file for this run

name: Build UI executables
on:
push:
pull_request:
release:
types: [published]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ui/requirements.txt
- name: Build executable
run: |
# choose separator for add-data
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then SEP=';'; else SEP=':'; fi
python -m PyInstaller --name ok_computer_ui-${{ matrix.os }} --onefile \
--add-data "ui/templates${SEP}templates" \
--add-data "ui/static${SEP}static" \
--collect-submodules flask \
--hidden-import socket \
ui/app.py
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ok_computer_ui-${{ matrix.os }}
path: dist/*
- name: Upload binaries to GitHub Release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: dist/**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}