Add usage command and allow running the emulator with no serial conne… #28
Workflow file for this run
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
########################################################################### | |
# ELM327-emulator | |
# ELM327 Emulator for testing software interfacing OBDII via ELM327 adapter | |
# https://github.com/Ircama/ELM327-emulator | |
# (C) Ircama 2021 - CC-BY-NC-SA-4.0 | |
########################################################################### | |
name: Upload ELM327-emulator Package to PyPI and TestPyPI | |
#on: | |
# release: | |
# types: [created] | |
#on: [push] | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-n-publish: | |
name: Build and publish Python to PyPI and TestPyPI | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
# Checking out the project and building distributions | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
# This will download your repository into the CI runner and then install and activate Python | |
- name: Upgrade pip | |
run: pip install --upgrade pip | |
- name: Install build dependencies | |
run: pip install pyyaml python-daemon obd setuptools wheel twine build | |
- name: Build the package | |
run: python -m build | |
- name: Publish | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Publish package distributions to TestPyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ |