Spaces:
Paused
Paused
Add cd workflow for publishing to PyPi
Browse files- .github/workflows/cd.yml +24 -0
.github/workflows/cd.yml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Publish Python 🐍 distributions 📦 to PyPI
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
release:
|
| 5 |
+
types: [created]
|
| 6 |
+
|
| 7 |
+
jobs:
|
| 8 |
+
deploy:
|
| 9 |
+
runs-on: ubuntu-latest
|
| 10 |
+
|
| 11 |
+
steps:
|
| 12 |
+
- uses: actions/checkout@v4
|
| 13 |
+
- name: Set up Python
|
| 14 |
+
uses: actions/setup-python@v5
|
| 15 |
+
with:
|
| 16 |
+
python-version: '3.12'
|
| 17 |
+
- name: Install dependencies
|
| 18 |
+
run: |
|
| 19 |
+
pip install poetry
|
| 20 |
+
poetry build
|
| 21 |
+
- name: Build and publish
|
| 22 |
+
uses: pypa/gh-action-pypi-publish@release/v1
|
| 23 |
+
with:
|
| 24 |
+
password: ${{ secrets.PYPI_API_TOKEN }}
|