Skip to content

Publish to PyPI

Publish to PyPI #26

Workflow file for this run

name: Publish to PyPI
on:
workflow_run:
workflows: ["CI"] # 'ci.yaml' 워크플로 이름
types:
- completed
jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }} # CI 성공 시에만 실행
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build the package
run: python -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: python -m twine upload dist/*