Skip to content

Commit 2118740

Browse files
authored
🔧 Add publish action (#15)
1 parent 87eaba5 commit 2118740

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

‎.github/workflows/ci.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,26 @@ jobs:
4545
pip install -e .
4646
- name: Run pytest
4747
run: pytest
48+
49+
publish:
50+
51+
name: Publish to PyPi
52+
needs: [pre-commit, tests]
53+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Checkout source
57+
uses: actions/checkout@v3
58+
- name: Set up Python
59+
uses: actions/setup-python@v4
60+
with:
61+
python-version: "3.8"
62+
- name: install flit
63+
run: |
64+
pip install flit~=3.4
65+
- name: Build and publish
66+
run: |
67+
flit publish
68+
env:
69+
FLIT_USERNAME: __token__
70+
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)