File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,22 +53,18 @@ jobs:
5353 - name : Build package
5454 run : python -m build
5555
56- - name : Publish to TestPyPI
57- uses : pypa/gh-action-pypi-publish@release/v1
58- with :
59- repository-url : https://test.pypi.org/legacy/
60- user : __token__
61- password : ${{ secrets.TEST_PYPI_API_TOKEN }}
56+ - name : Upload to TestPyPI
57+ run : ./scripts/upload_testpypi.sh
58+ env :
59+ TEST_PYPI_API_TOKEN : ${{ secrets.TEST_PYPI_API_TOKEN }}
6260
6361 - name : Verify install from TestPyPI
6462 run : |
6563 python -m pip install --upgrade pip
6664 pip install --index-url https://test.pypi.org/simple/ --no-deps pytest-htmlx
6765 python -c "import pytest_htmlx; print(pytest_htmlx.__version__)"
68-
66+
6967 - name : Publish to PyPI
70- if : success()
71- uses : pypa/gh-action-pypi-publish@release/v1
72- with :
73- user : __token__
74- password : ${{ secrets.PYPI_API_TOKEN }}
68+ run : ./scripts/upload_pypi.sh
69+ env :
70+ PYPI_API_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ PACKAGE_NAME=" pytest-htmlx"
5+
6+ echo " π¦ Building $PACKAGE_NAME ..."
7+
8+ # Clean old builds
9+ rm -rf dist/ build/ * .egg-info
10+
11+ # Build (source + wheel)
12+ python -m build
13+
14+ echo " π Uploading to PyPI ..."
15+
16+ twine upload \
17+ -u __token__ \
18+ -p " $PYPI_API_TOKEN " \
19+ dist/*
20+
21+ echo " β
Uploaded to PyPI!"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ PACKAGE_NAME=" pytest-htmlx"
5+
6+ echo " π¦ Building $PACKAGE_NAME ..."
7+
8+ # Clean old builds
9+ rm -rf dist/ build/ * .egg-info
10+
11+ # Build (source + wheel)
12+ python -m build
13+
14+ echo " π Uploading to TestPyPI ..."
15+
16+ twine upload \
17+ --repository-url https://test.pypi.org/legacy/ \
18+ -u __token__ \
19+ -p " $TEST_PYPI_API_TOKEN " \
20+ dist/*
21+
22+ echo " β
Uploaded to TestPyPI!"
23+ echo " π Verify install with:"
24+ echo " pip install --index-url https://test.pypi.org/simple/ --no-deps $PACKAGE_NAME "
You canβt perform that action at this time.
0 commit comments