Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/deploy-wheel-to-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Deploy Wheel to PyPI

on:
release:
types: [published]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true

permissions:
contents: read
id-token: write # For trusted publishing to PyPI

jobs:
build-wheel:
if: github.repository == 'NVIDIA/tilus'
runs-on: linux-amd64-gpu-l4-latest-1
container:
image: nvidia/cuda:12.6.2-devel-ubuntu22.04
options: --gpus all
outputs:
wheel-path: ${{ steps.setup-and-install.outputs.wheel-path }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup and Install Tilus
id: setup-and-install
uses: ./.github/actions/setup-environment
with:
python-version: '3.10'

- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
name: tilus-wheel
path: dist/*.whl
retention-days: 7

deploy-to-pypi:
needs: build-wheel
# Only deploy to PyPI if triggered by release (not manual workflow_dispatch)
if: github.repository == 'NVIDIA/tilus' && github.event_name == 'release'
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/tilus
steps:
- name: Download wheel artifact
uses: actions/download-artifact@v4
with:
name: tilus-wheel
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 3 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
files: |
tests/**
python/**
sha: 'main'
base_sha: 'main'

- name: Check for changes in examples
id: changed-examples
Expand All @@ -37,7 +37,7 @@ jobs:
files: |
python/**
examples/**
sha: 'main'
base_sha: 'main'

- name: Check for changes in docs
id: changed-docs
Expand All @@ -46,7 +46,7 @@ jobs:
files: |
python/**
docs/**
sha: 'main'
base_sha: 'main'

tests:
needs: check-changes
Expand Down