-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.25 KB
/
Copy pathworkflow.yml
File metadata and controls
47 lines (38 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Publish Python Package to PyPI-Resmi
on:
push:
branches: ["main"]
workflow_dispatch:
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write # Gerekli: OIDC token istemek için
contents: read # Kod deposunu okumak için
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build docs
run: |
pip install -r docs/requirements.txt
- name: Clean unnecessary files before build
run: |
echo "🧹 Gereksiz dosyalar temizleniyor..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -name "*.pyc" -delete 2>/dev/null || true
find . -name "*.pyo" -delete 2>/dev/null || true
rm -rf build/ dist/ *.egg-info .pytest_cache .mypy_cache
echo "✅ Temizlik tamamlandı"
- name: Build the package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1