Skip to content

Commit a36fa28

Browse files
committed
chore: Add GitHub Actions workflow for PyPI package publishing
1 parent 5caf1c4 commit a36fa28

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/pypi-release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Python Package to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*" # v로 시작하는 태그 (예: v1.0.0)
7+
8+
jobs:
9+
deploy:
10+
name: Build and Publish
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.x"
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip setuptools wheel twine
25+
26+
- name: Build package (setup.py)
27+
run: python setup.py sdist bdist_wheel
28+
29+
- name: Publish to PyPI
30+
env:
31+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
32+
run: twine upload --username __token__ --password $PYPI_API_TOKEN dist/*

0 commit comments

Comments
 (0)