Skip to content

Commit 752ce17

Browse files
author
Thomas Pinder
committed
Test PyPi uploading
1 parent 7e2facc commit 752ce17

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/workflow-master.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,37 @@ jobs:
3131
token: ${{ secrets.CODECOV_TOKEN }}
3232
file: ./coverage.xml
3333
flags: unittests
34+
35+
build:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v2
39+
with:
40+
fetch-depth: 0
41+
- uses: actions/setup-python@v2
42+
name: Install Python
43+
with:
44+
python-version: "3.8"
45+
- name: Build sdist and wheel
46+
run: |
47+
python -m pip install -U pip
48+
python -m pip install -U build
49+
python -m build .
50+
- uses: actions/upload-artifact@v2
51+
with:
52+
path: dist/*
53+
54+
upload_pypi:
55+
needs: [tests, build]
56+
runs-on: ubuntu-latest
57+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
58+
steps:
59+
- uses: actions/download-artifact@v2
60+
with:
61+
name: artifact
62+
path: dist
63+
64+
- uses: pypa/[email protected]
65+
with:
66+
user: __token__
67+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)