Skip to content
Snippets Groups Projects
Commit 282dfbeb authored by Ellis Percival's avatar Ellis Percival
Browse files

Add initial publish job

parent 386f3d39
Branches
Tags
No related merge requests found
...@@ -20,3 +20,32 @@ jobs: ...@@ -20,3 +20,32 @@ jobs:
- run: make black - run: make black
if: matrix.python-version != '2.7' if: matrix.python-version != '2.7'
- run: PYTHONPATH=$GITHUB_WORKSPACE py.test -m "not hw_raspberrypi and not mqtt" - run: PYTHONPATH=$GITHUB_WORKSPACE py.test -m "not hw_raspberrypi and not mqtt"
publish:
name: Publish to PyPI
runs-on: ubuntu-18.04
needs: test
strategy:
matrix:
python-version: ["2.7", "3.6"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install black
if: matrix.python-version != '2.7'
- run: pip install -r requirements.txt
- run: make schema
- run: make black
if: matrix.python-version != '2.7'
- run: pip install build
- run: build --wheel --outdir dist/ .
if: matrix.python-version == '2.7'
- run: build --sdist --wheel --outdir dist/ .
if: matrix.python-version == '3.6'
- uses: pypa/gh-action-pypi-publish@master
with:
password: test
repository_url: https://test.pypi.org/legacy/
- uses: pypa/gh-action-pypi-publish@master
if: startsWith(github.ref, 'refs/tags')
with:
password: ${{ secrets.PYPI_API_TOKEN }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment