Skip to content

Commit ab1a889

Browse files
committed
Add github action to publish to pypi on tagged
1 parent 4510270 commit ab1a889

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/pypi_push.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
2+
3+
on: push
4+
5+
jobs:
6+
build-n-publish:
7+
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@master
11+
- name: Set up Python 3.10 🐍🐍🐍
12+
uses: actions/setup-python@v1
13+
with:
14+
python-version: 3.10
15+
- name: Install poetry
16+
run: |
17+
python -m pip install poetry
18+
- name: Install dependencies through Poetry
19+
run: |
20+
python -m poetry install --with dev
21+
- name: Publish distribution 📦 to PyPI
22+
if: startsWith(github.event.ref, 'refs/tags')
23+
env:
24+
PYPI_TOKEN: ${{ secrets.pypi_deploy }}
25+
run: |
26+
poetry config pypi-token.pypi $PYPI_TOKEN
27+
poetry publish --build

0 commit comments

Comments
 (0)