Update help text and add option device for device console #41
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: Main | |
on: | |
push: | |
paths-ignore: | |
- '**/README.md' | |
- '.*' | |
pull_request: | |
types: [opened, synchronize] | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
codestyle: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- run: | | |
pip install poetry | |
poetry install | |
poetry run pycodestyle --ignore=E501 hardwario | |
test_build: | |
needs: codestyle | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
- '3.13' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: | | |
pip install poetry | |
poetry install | |
poetry run hardwario --version | |
poetry build | |
deploy: | |
needs: test_build | |
if: ${{ github.event_name == 'release' }} | |
runs-on: ubuntu-latest | |
environment: deploy | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Publish | |
env: | |
POETRY_HTTP_BASIC_PYPI_USERNAME: __token__ | |
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring | |
run: | | |
pip install poetry | |
poetry install | |
sed -r -i'' "s/\"1\.0\.0\"/\"$RELEASE_VERSION\"/g" pyproject.toml | |
sed -r -i'' "s/'1\.0\.0'/'$RELEASE_VERSION'/g" src/hardwario/hardwario/__init__.py | |
poetry publish --build |