-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (43 loc) · 1.3 KB
/
publish-test.yml
File metadata and controls
53 lines (43 loc) · 1.3 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
name: Publish to TestPyPI
on:
workflow_dispatch: # Manual trigger only
jobs:
publish_test:
name: Publish to TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
# For CI stability, performance and compatibility reasons
python-version: "3.12"
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 test artifacts
uses: actions/upload-artifact@v7
with:
name: testpypi-${{ github.run_number }}-${{ github.ref_name }}
path: dist/
retention-days: 7
- name: Publish to TestPyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
twine upload --repository testpypi dist/*
- name: Wait for TestPyPI indexing
run: |
echo "Waiting for TestPyPI to index the package..."
sleep 60
- name: Verify published versions
run: |
echo "Available versions:"
pip index versions --index-url https://test.pypi.org/simple/ wiley-tdm