Skip to content

Commit 014147b

Browse files
committed
Add deploy-to-pypi-test job
1 parent 73e0781 commit 014147b

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

.github/workflows/main.yaml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: test
2-
run-name: Test
3-
on: [ push ]
1+
name: Test and Deploy
2+
on: push
43
jobs:
54
test:
65
strategy:
76
fail-fast: false
87
matrix:
9-
python-version: [ '3.10', '3.11', '3.12' ]
8+
# python-version: [ '3.10', '3.11', '3.12' ] # TODO: Re-include to 3.11 and 3.12
9+
python-version: [ '3.10' ]
1010
os: [ ubuntu-latest ]
1111
runs-on: ${{ matrix.os }}
1212
steps:
@@ -31,3 +31,24 @@ jobs:
3131

3232
- name: Run tests
3333
run: make test
34+
35+
deploy-to-pypi-test:
36+
name: Deploy to TestPyPI
37+
runs-on: ubuntu-latest
38+
needs: test
39+
if: github.ref == 'refs/heads/develop'
40+
41+
steps:
42+
- name: Install poetry
43+
run: pipx install poetry
44+
45+
- name: Setup Python
46+
uses: actions/setup-python@v3
47+
with:
48+
python-version: '3.10'
49+
50+
- name: Configure Poetry for TestPyPI
51+
run: poetry config repositories.testpypi https://test.pypi.org/legacy/
52+
53+
- name: Build and publish to TestPyPI
54+
run: poetry publish --build --repository testpypi

0 commit comments

Comments
 (0)