-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (44 loc) · 1.27 KB
/
publish.yml
File metadata and controls
54 lines (44 loc) · 1.27 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
48
49
50
51
52
53
54
name: Publish to PyPI
on:
release:
types: [published]
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
# For CI stability, performance and compatibility reasons
cache: 'pip'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install ".[build]"
- name: Build package
run: python3 -m build
- name: Verify package integrity
run: twine check dist/*
- name: Upload release artifacts
uses: actions/upload-artifact@v7
with:
name: release-dist-${{ github.ref_name }}
path: dist/
retention-days: 30 # Keep release artifacts longer
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload --repository pypi dist/*
- name: Wait for PyPI indexing
run: |
echo "Waiting for PyPI to index the package..."
sleep 60
- name: Verify published versions
run: |
echo "Available versions:"
pip index versions --index-url https://pypi.org/simple/ wiley-tdm