Skip to content

Commit 5dacf72

Browse files
committed
Fix publishing url for production
- Change PyPI environment option from pypi.org to upload.pypi.org - Simplify repository URL handling for publishing
1 parent 6d2de92 commit 5dacf72

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

.github/actions/prepare/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ runs:
6262
.venv
6363
key: uv-${{ hashFiles('uv.lock') }}
6464

65+
# TODO: Considering separating cache for python versions (.local/share/uv/)
66+
# Will need to update utils/pyvers.py to report the Python patch version to use as the hashfiles input
67+
6568
# Pipx Cache Control
6669
- name: Restore pipx cache
6770
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 #v5.0.3

.github/workflows/ci-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
9595
echo "fully_cached=${{ steps.tests.outputs.cache-hit && steps.security.outputs.cache-hit && steps.analysis.outputs.cache-hit }}" >> $GITHUB_OUTPUT
9696
97-
- name: Checkout codebase
97+
- name: Checkout essential prebuild files
9898
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
9999

100100
# Cache warmup for parallel dependent jobs

.github/workflows/ci-publish.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
type: choice
1414
options:
1515
- test.pypi.org
16-
- pypi.org
16+
- upload.pypi.org
1717
skip_cache:
1818
description: "Skip Commit SHA Cache"
1919
required: true
@@ -32,7 +32,6 @@ jobs:
3232
build-cache-hit: ${{ steps.build.outputs.cache-hit && !inputs.skip_cache }}
3333
repo_name: ${{ steps.config.outputs.repo_name }}
3434
project_name: ${{ steps.config.outputs.project_name }}
35-
repository_url: ${{ steps.config.outputs.repository_url }}
3635
steps:
3736
- name: Sparse checkout codebase
3837
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
@@ -60,13 +59,6 @@ jobs:
6059
echo "repo_name=${GITHUB_REPOSITORY#*/}" >> $GITHUB_OUTPUT
6160
echo "project_name=${PYPROJECT_NAME}" >> $GITHUB_OUTPUT
6261
63-
# test.pypi.org requires appending /legacy/ to the URL
64-
if [[ "${{ inputs.environment }}" == "test.pypi.org" ]]; then
65-
echo "repository_url=https://${{ inputs.environment }}/legacy/" >> $GITHUB_OUTPUT
66-
else
67-
echo "repository_url=https://${{ inputs.environment }}" >> $GITHUB_OUTPUT
68-
fi
69-
7062
- name: Lookup build cache
7163
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 #v5.0.3
7264
id: build
@@ -121,4 +113,4 @@ jobs:
121113
if: ${{ !env.ACT }}
122114
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e #v1.13.0
123115
with:
124-
repository-url: ${{ needs.prepublish.outputs.repository_url }}
116+
repository-url: https://${{ inputs.environment }}/legacy/

0 commit comments

Comments
 (0)