File tree 1 file changed +41
-0
lines changed
1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Upload Python Package to test.pypi.org
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ deploy :
9
+
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v2
14
+ - name : Set up Python
15
+ uses : actions/setup-python@v2
16
+ with :
17
+ python-version : " 3.8"
18
+
19
+ - name : Install dependencies
20
+ run : |
21
+ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
22
+ $HOME/.poetry/bin/poetry install
23
+
24
+ - name : Build package
25
+ run : $HOME/.poetry/bin/poetry build
26
+
27
+ - name : Setup Test PyPI in poetry
28
+ env :
29
+ TEST_PYPI_API_TOKEN : ${{ secrets.TEST_PYPI_API_TOKEN }}
30
+ run : |
31
+ touch $HOME/.pypirc
32
+ echo "[testpypi]" >> $HOME/.pypirc
33
+ echo " username = __token__" >> $HOME/.pypirc
34
+ echo " password = $TEST_PYPI_API_TOKEN" >> $HOME/.pypirc
35
+ $HOME/.poetry/bin/poetry config repositories.test-pypi https://test.pypi.org/legacy/
36
+ $HOME/.poetry/bin/poetry config pypi-token.test-pypi "$TEST_PYPI_API_TOKEN"
37
+
38
+ - name : Publish package to test.pypi.org
39
+ run : |
40
+ $HOME/.poetry/bin/poetry publish -r test-pypi
41
+
You can’t perform that action at this time.
0 commit comments