Skip to content

Commit

Permalink
Updates PyPI upload step to run outside the tripy container
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavm-nvidia committed Dec 17, 2024
1 parent f2c798c commit 47d26db
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions .github/workflows/tripy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,19 @@ jobs:
cd /tripy/
pytest --cov=tripy/ --cov-config=.coveragerc tests/ -v -m "not l1" -n 4 --durations=15 --ignore tests/performance
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: /tripy/dist/nvtripy-*.whl
fail_on_unmatched_files: true

- name: Publish To PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: /tripy/dist/

- uses: actions/configure-pages@v5

- uses: actions/upload-pages-artifact@v3
Expand All @@ -71,3 +72,26 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

pypi-publish:
runs-on: ubuntu-latest
needs:
- build-and-release

# Dedicated environments with protections for publishing are strongly recommended.
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
environment:
name: pypi
url: https://pypi.org/p/nvtripy

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/

0 comments on commit 47d26db

Please sign in to comment.