Skip to content

Commit b097186

Browse files
authored
PYTHON-5017 Use a separate PyPI publish step (#39)
1 parent 3554c7d commit b097186

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.evergreen/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ pip install "./mongo-python-driver[test]"
1919
pip install -e ./src
2020

2121
pushd ./mongo-python-driver
22-
.evergreen/run-mongodb-aws-test.sh regular
22+
.evergreen/scripts/run-mongodb-aws-test.sh regular
2323
popd
2424
popd

.github/workflows/release-python.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,23 @@ jobs:
6565

6666
publish:
6767
needs: [build-dist, static-scan]
68+
name: Upload release to PyPI
69+
runs-on: ubuntu-latest
70+
environment: release
71+
permissions:
72+
id-token: write
73+
steps:
74+
- name: Download all the dists
75+
uses: actions/download-artifact@v4
76+
with:
77+
name: all-dist-${{ github.run_id }}
78+
path: dist/
79+
- name: Publish package distributions to PyPI
80+
if: startsWith(inputs.dry_run, 'false')
81+
uses: pypa/gh-action-pypi-publish@release/v1
82+
83+
post-publish:
84+
needs: [publish]
6885
runs-on: ubuntu-latest
6986
environment: release
7087
permissions:
@@ -83,7 +100,7 @@ jobs:
83100
aws_region_name: ${{ vars.AWS_REGION_NAME }}
84101
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
85102
artifactory_username: ${{ vars.ARTIFACTORY_USERNAME }}
86-
- uses: mongodb-labs/drivers-github-tools/python/publish@v2
103+
- uses: mongodb-labs/drivers-github-tools/python/post-publish@v2
87104
with:
88105
version: ${{ inputs.version }}
89106
following_version: ${{ inputs.following_version }}

0 commit comments

Comments
 (0)