Extend device interface autodetection #17
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
name: Publish to PyPi | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build-distribution: | |
name: "Build distribution" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout tag/branch" | |
uses: "actions/checkout@v3" | |
- name: "Setup Python" | |
uses: "actions/setup-python@v3" | |
with: | |
python-version: "3.9" | |
- name: "Install build dependencies" | |
run: | | |
set -xe | |
python -VV | |
python -m site | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install --upgrade -r requirements.txt | |
python -m pip install . | |
pip install build | |
- name: "Build wheels & source dist" | |
run: | | |
python -m build --sdist --wheel | |
- name: "Test wheels" | |
run: | | |
python -m venv build_env --clear | |
source build_env/bin/activate | |
bash build_tools/test_wheels.sh ${{ github.ref_name }} | |
- name: Store artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: source-dist | |
path: dist | |
PyPi: | |
needs: ["build-distribution"] | |
name: "Publish to PyPi" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: source-dist | |
path: dist | |
- name: Publish to PyPI | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: pypa/gh-action-pypi-publish@v1.4.2 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages_dir: dist |