Skip to content

Commit 54d6458

Browse files
committed
[python-conprof] also publish package on test.pypi.com when releasing staging
1 parent 2efaf2a commit 54d6458

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

.github/workflows/release_prod.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ jobs:
5656
- name: Download build artifacts
5757
uses: actions/download-artifact@v5
5858
- run: |
59+
sudo pip install twine
5960
./scripts/releasing/release.sh wheel_dist
6061
env:
61-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
62+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
63+
TWINE_NON_INTERACTIVE: 1
64+
TWINE_USERNAME: __token__

.github/workflows/release_staging.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,19 @@ jobs:
4646
name: wheel_dist
4747
path: |
4848
wheel_dist/*
49+
release:
50+
name: Release
51+
runs-on: ubuntu-latest
52+
needs: gen-binary
53+
steps:
54+
- uses: actions/checkout@v5
55+
- name: Download build artifacts
56+
uses: actions/download-artifact@v5
57+
- run: |
58+
sudo pip install twine
59+
./scripts/releasing/release.sh wheel_dist
60+
env:
61+
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }}
62+
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
63+
TWINE_NON_INTERACTIVE: 1
64+
TWINE_USERNAME: __token__

scripts/releasing/release-common.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,10 @@
22

33
set -eu
44

5-
# This flag toggles the release destination to testing.pypi.org if set to true
6-
DEPLOY_TESTPYPI=false
7-
85
# a TWINE_PASSWORD environment varialbe is required for it to work.
96
function release()
107
{
118
wheel_path="$1"
129

13-
if [ "$DEPLOY_TESTPYPI" = true ] ; then
14-
export TWINE_REPOSITORY_URL="https://test.pypi.org/legacy/"
15-
fi
16-
1710
twine upload $wheel_path/*.whl --verbose
1811
}

0 commit comments

Comments
 (0)