Skip to content

Commit 1467fd3

Browse files
committed
workflows: add testpypi flow
1 parent 6a5b58d commit 1467fd3

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,33 @@ jobs:
105105
path: dist/*.whl
106106

107107
publish:
108+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
109+
needs: [build-non-windows-wheel, build-windows-wheel]
110+
runs-on: ubuntu-latest
111+
environment:
112+
name: pypi
113+
url: https://pypi.org/p/vs-placebo
114+
108115
permissions:
109116
id-token: write
117+
118+
steps:
119+
- uses: actions/download-artifact@v8
120+
with:
121+
path: dist
122+
merge-multiple: true
123+
124+
- uses: pypa/gh-action-pypi-publish@release/v1
125+
126+
publish-to-testpy:
110127
needs: [build-non-windows-wheel, build-windows-wheel]
111-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
112128
runs-on: ubuntu-latest
129+
environment:
130+
name: testpypi
131+
url: https://pypi.org/p/vs-placebo
132+
133+
permissions:
134+
id-token: write
113135

114136
steps:
115137
- uses: actions/download-artifact@v8
@@ -118,3 +140,5 @@ jobs:
118140
merge-multiple: true
119141

120142
- uses: pypa/gh-action-pypi-publish@release/v1
143+
with:
144+
repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)