Skip to content

Commit 3c42655

Browse files
Update ci.yml
1 parent 9c5c5c3 commit 3c42655

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,30 @@ jobs:
3636
- name: Test
3737
run: poetry run pytest -rP .
3838

39+
publish-to-testpypi:
40+
needs: [compile, test]
41+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
42+
runs-on: ubuntu-20.04
43+
steps:
44+
- name: Checkout repo
45+
uses: actions/checkout@v3
46+
- name: Set up python
47+
uses: actions/setup-python@v4
48+
with:
49+
python-version: 3.8
50+
- name: Bootstrap poetry
51+
run: |
52+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
53+
- name: Install dependencies
54+
run: poetry install
55+
- name: Publish to testpypi
56+
run: |
57+
poetry config repositories.test-pypi https://test.pypi.org/legacy/
58+
poetry --no-interaction -v publish --build --repository test-pypi --username "$TEST_PYPI_USERNAME" --password "$TEST_PYPI_PASSWORD"
59+
env:
60+
PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
61+
PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
62+
3963
publish:
4064
needs: [compile, test]
4165
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)