Skip to content

Commit e982c77

Browse files
committed
Adds a GitHub action to build and upload the package to PyPI on release.
Signed-off-by: rafa-be <raphael@noisycamp.com>
1 parent 3b720bb commit e982c77

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

.github/workflows/pypi.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish Python package to PyPI
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
deploy:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
- name: Set up Python 3.8
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.8"
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install build twine
27+
pip install -r requirements.txt
28+
29+
- name: Build package
30+
run: python -m build
31+
32+
- name: Publish to PyPI
33+
env:
34+
TWINE_USERNAME: __token__
35+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
36+
run: |
37+
python -m twine upload dist/*

parfun/about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "7.0.0"
1+
__version__ = "7.0.1"

0 commit comments

Comments
 (0)