mirror of
https://github.com/val1813/kwcode.git
synced 2026-09-03 06:34:30 +08:00
v1.0.8 was already uploaded manually, CI got 400 Bad Request. Add --skip-existing flag and bump version for next release. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
681 B
YAML
36 lines
681 B
YAML
name: Publish to PyPI
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install build tools
|
|
run: pip install "build" "twine" "setuptools>=68.0,<78.0"
|
|
|
|
- name: Build package
|
|
run: python -m build
|
|
|
|
- name: Check package
|
|
run: twine check dist/*
|
|
|
|
- name: Publish to PyPI
|
|
env:
|
|
TWINE_USERNAME: __token__
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
run: twine upload dist/* --verbose --skip-existing
|