Skip to content

Commit

Permalink
Publish to test pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
b-c-ds authored and bcaller committed Jan 7, 2021
1 parent 115c809 commit 1c6bbdd
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Python package
on: [push]

jobs:
build-python:
test-python:

runs-on: ubuntu-latest
strategy:
Expand All @@ -29,16 +29,6 @@ jobs:
run: |
pip install -e .
pytest
- name: Build
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: build
path: dist/*

test-node:

Expand All @@ -63,3 +53,31 @@ jobs:
env:
CI: true
- run: npm run lint --if-present


build-python:

needs: [test-python, test-node]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Build
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: build
path: dist/*
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

0 comments on commit 1c6bbdd

Please sign in to comment.