[CI/CD] Setup complete workflow

This commit is contained in:
OleehyO
2025-04-23 03:00:04 +00:00
parent 6a67017962
commit 29f6f8960d
5 changed files with 171 additions and 0 deletions

36
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Publish to PyPI
on:
push:
branches:
- 'main'
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build package with uv
run: |
uv build
- name: Publish to PyPI
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
uv publish --token $UV_PUBLISH_TOKEN