Skip to content

Commit 1c6bbdd

Browse files
b-c-dsbcaller
authored andcommitted
Publish to test pypi
1 parent 115c809 commit 1c6bbdd

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

.github/workflows/main.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Python package
33
on: [push]
44

55
jobs:
6-
build-python:
6+
test-python:
77

88
runs-on: ubuntu-latest
99
strategy:
@@ -29,16 +29,6 @@ jobs:
2929
run: |
3030
pip install -e .
3131
pytest
32-
- name: Build
33-
run: |
34-
pip install wheel
35-
python setup.py sdist bdist_wheel
36-
- name: Upload artifacts
37-
uses: actions/upload-artifact@v2
38-
with:
39-
name: build
40-
path: dist/*
41-
4232
4333
test-node:
4434

@@ -63,3 +53,31 @@ jobs:
6353
env:
6454
CI: true
6555
- run: npm run lint --if-present
56+
57+
58+
build-python:
59+
60+
needs: [test-python, test-node]
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v2
64+
- name: Set up Python 3.9
65+
uses: actions/setup-python@v2
66+
with:
67+
python-version: 3.9
68+
- name: Build
69+
run: |
70+
pip install wheel
71+
python setup.py sdist bdist_wheel
72+
- name: Upload artifacts
73+
uses: actions/upload-artifact@v2
74+
with:
75+
name: build
76+
path: dist/*
77+
- name: Publish package
78+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
79+
uses: pypa/gh-action-pypi-publish@master
80+
with:
81+
user: __token__
82+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
83+
repository_url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)