Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1dbe60e

Browse files
committedMar 3, 2025·
ci: add to publish releases into PyPi
1 parent 88b54ba commit 1dbe60e

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed
 

‎.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ jobs:
1111
uses: actions/checkout@v4
1212
- name: Install dependencies
1313
run: pip install pycodestyle pylint
14-
- name: Run linters
14+
- name: Run linting
1515
run: make lint

‎.github/workflows/pypi.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish Package to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- '*.*.*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.12'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install setuptools wheel twine
22+
- name: Build package
23+
run: |
24+
python setup.py sdist bdist_wheel
25+
- name: Upload package to PyPI
26+
run: |
27+
twine upload dist/*
28+
env:
29+
TWINE_USERNAME: __token__
30+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)
Please sign in to comment.