Skip to content

Commit 43368e4

Browse files
authored
Add test PyPi workflow
1 parent c9bc062 commit 43368e4

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflows will upload a Python Package using Poetry when a release is created
2+
3+
name: Publish Python Package (test)
4+
5+
on:
6+
release:
7+
types: [created]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: '3.x'
19+
20+
- name: Install and set up Poetry
21+
run: |
22+
curl -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
23+
python get-poetry.py -y
24+
25+
- name: Build and publish to PyPi
26+
env:
27+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.TEST_PYPI_API_TOKEN }}
28+
run: |
29+
poetry build
30+
poetry config repositories.testpypi https://test.pypi.org/legacy/
31+
poetry publish -r testpypi

0 commit comments

Comments
 (0)