Skip to content

Commit 2570287

Browse files
authored
[CI/CD] Add PyPI release action and update setup (#20)
* chore: add license * docs: add long desc in setup * chore: add pypi cd
1 parent b891de8 commit 2570287

File tree

3 files changed

+743
-3
lines changed

3 files changed

+743
-3
lines changed

.github/workflows/pypi_publish.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
deploy:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v3
27+
with:
28+
python-version: "3.10"
29+
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install build
34+
35+
- name: Build package
36+
run: python setup.py bdist_wheel
37+
38+
- name: Publish package
39+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
40+
with:
41+
user: __token__
42+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)