Farid Karimli
commited on
Commit
·
d329bec
1
Parent(s):
6064b0b
publishing workflow
Browse files
.github/workflows/publish.yml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Publish to PyPI
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
tags:
|
| 8 |
+
- "v*"
|
| 9 |
+
|
| 10 |
+
jobs:
|
| 11 |
+
deploy:
|
| 12 |
+
runs-on: ubuntu-latest
|
| 13 |
+
steps:
|
| 14 |
+
- uses: actions/checkout@v2
|
| 15 |
+
- name: Set up Python
|
| 16 |
+
uses: actions/setup-python@v2
|
| 17 |
+
with:
|
| 18 |
+
python-version: "3.x"
|
| 19 |
+
- name: Install dependencies
|
| 20 |
+
run: |
|
| 21 |
+
python -m pip install --upgrade pip
|
| 22 |
+
pip install setuptools wheel twine
|
| 23 |
+
- name: Build and publish
|
| 24 |
+
env:
|
| 25 |
+
TWINE_USERNAME: __token__
|
| 26 |
+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} # from pypi
|
| 27 |
+
run: |
|
| 28 |
+
python setup.py sdist bdist_wheel
|
| 29 |
+
twine upload dist/*
|