Skip to content

Commit 47d26db

Browse files
Updates PyPI upload step to run outside the tripy container
1 parent f2c798c commit 47d26db

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

.github/workflows/tripy-release.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,19 @@ jobs:
5050
cd /tripy/
5151
pytest --cov=tripy/ --cov-config=.coveragerc tests/ -v -m "not l1" -n 4 --durations=15 --ignore tests/performance
5252
53+
- name: Upload distributions
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: release-dists
57+
path: dist/
58+
5359
- name: Release
5460
uses: softprops/action-gh-release@v2
5561
with:
5662
generate_release_notes: true
5763
files: /tripy/dist/nvtripy-*.whl
5864
fail_on_unmatched_files: true
5965

60-
- name: Publish To PyPI
61-
uses: pypa/gh-action-pypi-publish@release/v1
62-
with:
63-
packages-dir: /tripy/dist/
64-
6566
- uses: actions/configure-pages@v5
6667

6768
- uses: actions/upload-pages-artifact@v3
@@ -71,3 +72,26 @@ jobs:
7172
- name: Deploy to GitHub Pages
7273
id: deployment
7374
uses: actions/deploy-pages@v4
75+
76+
pypi-publish:
77+
runs-on: ubuntu-latest
78+
needs:
79+
- build-and-release
80+
81+
# Dedicated environments with protections for publishing are strongly recommended.
82+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
83+
environment:
84+
name: pypi
85+
url: https://pypi.org/p/nvtripy
86+
87+
steps:
88+
- name: Retrieve release distributions
89+
uses: actions/download-artifact@v4
90+
with:
91+
name: release-dists
92+
path: dist/
93+
94+
- name: Publish release distributions to PyPI
95+
uses: pypa/gh-action-pypi-publish@release/v1
96+
with:
97+
packages-dir: dist/

0 commit comments

Comments
 (0)