Skip to content

Commit efe90b9

Browse files
authored
[MISC] Automatically deploy wheels on PyPI. (#1510)
1 parent 105586e commit efe90b9

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed

.github/workflows/generic.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
pull_request:
55
branches:
66
- main
7+
release:
8+
branches:
9+
- main
10+
types: [published]
711

812
concurrency:
913
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
@@ -30,6 +34,7 @@ jobs:
3034
TI_ENABLE_VULKAN: "0"
3135

3236
runs-on: ${{ matrix.OS }}
37+
if: github.event_name != 'release'
3338

3439
steps:
3540
- name: Print system information (Windows)
@@ -117,3 +122,32 @@ jobs:
117122
# Note that it is necessary to create a new archive systematically for now:
118123
# See: https://github.com/actions/cache/issues/1594
119124
key: ${{ matrix.OS }}-${{ matrix.PYTHON_VERSION }}-${{ github.run_id }}-${{ github.run_attempt }}
125+
126+
publish-pypi:
127+
name: Publish on PyPI
128+
runs-on: ubuntu-24.04
129+
permissions:
130+
id-token: write
131+
environment:
132+
name: advance
133+
134+
if: github.event_name == 'release'
135+
136+
steps:
137+
- name: Checkout code
138+
uses: actions/checkout@v4
139+
with:
140+
fetch-depth: 1
141+
142+
- name: Build wheels
143+
run: |
144+
pip wheel --no-deps . -w wheelhouse
145+
146+
- name: Publish the wheels on PyPI
147+
uses: pypa/[email protected]
148+
with:
149+
packages-dir: wheelhouse
150+
verify-metadata: true
151+
attestations: true
152+
print-hash: true
153+
skip-existing: true

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ requires = ["setuptools", "wheel", "cython>=3.0.0", "numpy>=1.26.4"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
# name = "genesis-world-nightly"
7-
# version = "0.0.3"
86
name = "genesis-world"
9-
version = "0.2.1"
7+
version = "0.3.0"
108
description = "A universal and generative physics engine"
119
readme = "README.md"
1210
requires-python = ">=3.10,<3.14"

0 commit comments

Comments
 (0)