Skip to content

Commit

Permalink
Merge pull request #3 from small-thinking/add-gha
Browse files Browse the repository at this point in the history
Add gha
  • Loading branch information
yxjiang authored Feb 29, 2024
2 parents 0d9ed98 + 1b8afe0 commit 5ec4b30
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish_to_pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Python Package to PyPI

# Trigger the workflow when a tag is pushed with a version starting with 'v'
on:
push:
tags:
- 'v*'

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
# Step name: Build package
- name: Build package
run: |
python setup.py sdist bdist_wheel
# Step name: Publish to PyPI
- name: Publish to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,6 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

logs
.env

0 comments on commit 5ec4b30

Please sign in to comment.