Skip to content

Add usage command and allow running the emulator with no serial conne… #8

Add usage command and allow running the emulator with no serial conne…

Add usage command and allow running the emulator with no serial conne… #8

Workflow file for this run

name: Build Workflow for elm327-emulator.exe/zip
on:
push:
tags:
- "v*.*.*"
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
- name: Install Python Requirements
run: |
python -m pip install --upgrade pip
#pip install git+https://github.com/pyinstaller/pyinstaller@develop
pip install pyinstaller
pip install .
- name: Create wrapper
run: |
echo "import sys
from elm import main
sys.exit(main())" > elm327-emulator.py
shell: pwsh
- name: Run PyInstaller to produce the exe file
run: |
python -m PyInstaller --onefile elm327-emulator.py --name elm327-emulator --collect-all elm
- name: Zip the elm327-emulator.exe asset to elm327-emulator.zip
run: |
Compress-Archive dist/elm327-emulator.exe dist/elm327-emulator.zip
shell: pwsh
- name: Generate Changelog
run: >
echo "The *elm327-emulator.exe* executable file in the
*elm327-emulator.zip* archive within the assets below is
auto-generated by a [GitHub Action](.github/workflows/build.yml)."
> ${{ github.workspace }}-CHANGELOG.txt
- name: Create Release, uploading the elm327-emulator.zip asset
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: ${{ github.workspace }}-CHANGELOG.txt
files: dist/elm327-emulator.zip
append_body: true
generate_release_notes: true