Skip to content

Commit 9500b68

Browse files
New GitHub Action to release to TestPyPI. Supports manual triggering
1 parent c9eee55 commit 9500b68

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/test-release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test Release
2+
3+
on:
4+
workflow_dispatch: # Manual trigger only
5+
6+
jobs:
7+
test_publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Set up Python
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: "3.9"
15+
16+
- name: Install build dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install -e ".[build]"
20+
21+
- name: Build
22+
run: |
23+
pip install build twine
24+
python -m build
25+
twine check dist/*
26+
27+
- name: Publish to TestPyPI
28+
env:
29+
TWINE_USERNAME: __token__
30+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
31+
run: |
32+
twine upload --repository testpypi dist/*
33+
34+
- name: Verify install from TestPyPI
35+
run: |
36+
pip install --index-url https://test.pypi.org/simple/ wiley-tdm
37+
python -c "from wiley_tdm import TDMClient; print(f'Successfully installed wiley-tdm version {TDMClient.__version__}')"

0 commit comments

Comments
 (0)