Skip to content

Commit 9fa446a

Browse files
committed
Switch to trusted publishing; force manylinux2014 wheel builds
Signed-off-by: pdmurray <[email protected]>
1 parent 270ba78 commit 9fa446a

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

.github/workflows/pypi_release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ on:
1414
name: Publish Python packages on PyPI
1515
needs: [build-sdist, build-wheels]
1616
runs-on: ubuntu-latest
17+
environment:
18+
name: pypi
19+
url: https://pypi.org/p/openvdb
20+
permissions:
21+
id-token: write
1722
steps:
1823
- name:  Download artifacts from commit ${{ github.sha }}
1924
uses: dawidd6/action-download-artifact@v2
@@ -28,15 +33,11 @@ on:
2833
uses: pypa/gh-action-pypi-publish@release/v1
2934
if: ${{ inputs.test_pypi }}
3035
with:
31-
user: __token__
32-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
33-
repository_url: https://test.pypi.org/legacy/
36+
repository-url: https://test.pypi.org/legacy/
3437
packages_dir: dist
3538

3639
- name: 🎉 Publish to PyPI
3740
uses: pypa/gh-action-pypi-publish@release/v1
3841
if: ${{ !inputs.test_pypi }}
3942
with:
40-
user: __token__
41-
password: ${{ secrets.PYPI_API_TOKEN }}
4243
packages_dir: dist

openvdb/openvdb/python/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,13 @@ Using GitHub actions, new `openvdb` versions are published to PyPI automatically
5454
when a new OpenVDB release is made. Releases can also published to PyPI by
5555
triggering the "Build and Release Python Bindings to PyPI" job, and specifying a
5656
branch/ref; if no ref is specified, the most recent commit on the given branch
57-
is used. Publishing to PyPI requires an API token to be specified as a secret
58-
(`PYPI_API_TOKEN`) on the repository.
57+
is used. Publishing to PyPI requires [trusted publishing][publishing] to be
58+
configured on PyPI.
5959

6060
If a maintainer wants to test the release process, they can do so by triggering
61-
a workflow dispatch, and clicking the option to release to `test.pypi.org`. In
62-
this case, a separate `TEST_PYPI_API_TOKEN` secret must be defined for the
63-
repository. Once the release is published to the PYPI testing index, you can
64-
install the release with
61+
a workflow dispatch, and clicking the option to release to `test.pypi.org`. Once
62+
the release is published to the PYPI testing index, you can install the release
63+
with
6564

6665
```bash
6766
pip install -v --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ openvdb
@@ -77,3 +76,4 @@ packaging for openvdb.
7776

7877
[scikit-build-core]: https://github.com/scikit-build/scikit-build-core
7978
[cmake_flags]: https://cmake.org/cmake/help/latest/module/FindPython.html
79+
[publishing]: https://docs.pypi.org/trusted-publishers/

openvdb/openvdb/python/pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,13 @@ cmake.minimum-version = "3.18"
3939
[tool.scikit-build.cmake.define]
4040
OPENVDB_BUILD_CORE = "ON"
4141
USE_NUMPY = "ON"
42+
43+
[tool.cibuildwheel]
44+
manylinux-x86_64-image = "manylinux2014"
45+
manylinux-i686-image = "manylinux2014"
46+
manylinux-aarch64-image = "manylinux2014"
47+
manylinux-ppc64le-image = "manylinux2014"
48+
manylinux-s390x-image = "manylinux2014"
49+
manylinux-pypy_x86_64-image = "manylinux2014"
50+
manylinux-pypy_i686-image = "manylinux2014"
51+
manylinux-pypy_aarch64-image = "manylinux2014"

0 commit comments

Comments
 (0)