Skip to content

Commit c73ab95

Browse files
committed
Fix.
1 parent 1098beb commit c73ab95

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

.github/workflows/build-wheels.yml

+27-12
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,36 @@ jobs:
5454
with:
5555
path: dist/*
5656

57+
upload_test_pypi:
58+
name: Upload to test PyPI (optional)
59+
if: ${{ github.event.inputs.test_pypi_publish == 'true' }}
60+
needs: [build]
61+
runs-on: ubuntu-latest
62+
environment:
63+
name: testpypi
64+
url: https://test.pypi.org/p/fenics-ufl
65+
permissions:
66+
id-token: write
67+
68+
steps:
69+
- uses: actions/download-artifact@v4
70+
with:
71+
name: artifact
72+
path: dist
73+
74+
- name: Push to test PyPI
75+
uses: pypa/gh-action-pypi-publish@release/v1
76+
with:
77+
repository-url: https://test.pypi.org/legacy/
78+
5779
upload_pypi:
5880
name: Upload to PyPI (optional)
81+
if: ${{ github.event.inputs.pypi_publish == 'true' }}
5982
needs: [build]
6083
runs-on: ubuntu-latest
84+
environment:
85+
name: pypi
86+
url: https://pypi.org/p/fenics-ufl
6187
permissions:
6288
id-token: write
6389

@@ -69,16 +95,5 @@ jobs:
6995

7096
- name: Push to PyPI
7197
uses: pypa/gh-action-pypi-publish@release/v1
72-
if: ${{ github.event.inputs.pypi_publish == 'true' }}
73-
environment:
74-
name: pypi
75-
url: https://pypi.org/p/fenics-ufl
76-
77-
- name: Push to Test PyPI
78-
uses: pypa/gh-action-pypi-publish@release/v1
79-
if: ${{ github.event.inputs.test_pypi_publish == 'true' }}
80-
environment:
81-
name: pypitest
82-
url: https://test.pypi.org/p/fenics-ufl
8398
with:
84-
repository-url: https://test.pypi.org/legacy/
99+
repository-url: https://pypi.org/legacy/

0 commit comments

Comments
 (0)