Skip to content

Commit bd48650

Browse files
authored
Create publish.yml
1 parent 2bb156a commit bd48650

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish:
10+
name: Publish to PyPI
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# Checkout the repository
15+
- name: Check out code
16+
uses: actions/checkout@v3
17+
18+
# Set up Python
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.x'
23+
24+
# Install dependencies
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install setuptools wheel twine
29+
30+
# Build the package
31+
- name: Build the package
32+
run: |
33+
python setup.py sdist bdist_wheel
34+
35+
# Publish to PyPI
36+
- name: Publish to PyPI
37+
uses: pypa/gh-action-pypi-publish@v1
38+
with:
39+
user: ${{ secrets.PYPI_USERNAME }}
40+
password: ${{ secrets.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)