This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
Create python-app.yml #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python application | ||
on: | ||
push: | ||
branches: [ "build" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
permissions: | ||
contents: read | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Versatile PyInstaller | ||
# You may pin to the exact commit or the version. | ||
# uses: sayyid5416/pyinstaller@454cc5f88cbfd6a1f7f5e6b9b96a0216be7f1720 | ||
uses: sayyid5416/[email protected] | ||
with: | ||
# path of your '.py' or '.spec' file. | ||
- This file will be used to create executable. | ||
- If .py: Generated spec file will also be uploaded as artifact | ||
spec: app/src/build_specs.spec | ||
# path of your requirements.txt file | ||
requirements: # optional, default is | ||
# Options to set for pyinstaller command Ex: options: '--onedir, -F' (seperated by comma and space) | ||
- Supported options: Check readme | ||
options: # optional, default is | ||
# specific python version you want to use | ||
python_ver: # optional, default is 3.10 | ||
# specific python architecture you want to use | ||
python_arch: # optional, default is x64 | ||
# Path on runner-os, where generated executable files are stored | ||
exe_path: ./dist | ||
# If passed, uploads executable artifact with this name. Else, artifact won't be uploaded. | ||
upload_exe_with_name: ocrautomation |