File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,3 +155,33 @@ jobs:
155155 - run : bin/install_flint_ubuntu.sh ${{ matrix.flint-tag }}
156156 - run : pip install .
157157 - run : python -m flint.test --verbose
158+
159+ # Deploy wheels and sdist to PyPI
160+
161+ pypi_release :
162+ name : Publish to PyPI
163+ needs : [build_wheels, build_sdist]
164+ # Run only when a tag is pushed to the flintlib/python-flint repo
165+ if : " github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && github.owner == flintlib"
166+ environment :
167+ name : pypi
168+ url : https://pypi.org/p/sympy
169+ permissions :
170+ id-token : write
171+ runs-on : ubuntu-latest
172+
173+ steps :
174+ # Downloads all artifacts
175+ - name : Download release artifacts
176+ uses : actions/download-artifact@v4
177+ with :
178+ path : wheelhouse
179+
180+ - name : Copy the PyPI files into dist
181+ run : mkdir dist && cp wheelhouse/*.whl wheelhouse/*.tar.gz dist
182+
183+ - name : Publish package on PyPI
184+ # It is recommended to pin a commit hash here for security but it
185+ # should be kept up to date. Possibly all actions and dependencies used
186+ # by the build script should be pinned...
187+ uses : pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
You can’t perform that action at this time.
0 commit comments