Skip to content

Commit 154ea14

Browse files
committed
ci: Publish to test.pypi.org on every commit against main.
1 parent 554e84d commit 154ea14

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,28 @@ jobs:
183183
name: release-notes.md
184184
path: release-notes.md
185185

186-
deploy:
187-
name: Deploy
186+
publish-test-pypi:
187+
name: Publish packages to test.pypi.org
188+
environment: release
189+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
190+
needs: [lint, check]
191+
runs-on: ubuntu-latest
192+
permissions:
193+
id-token: write
194+
steps:
195+
- name: Download distributions
196+
uses: actions/download-artifact@v4
197+
with:
198+
name: dist
199+
path: dist
200+
- name: Upload to test.pypi.org
201+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
202+
with:
203+
repository-url: https://test.pypi.org/legacy/
204+
205+
publish-pypi:
206+
name: Publish packages to pypi.org
188207
environment: release
189-
# Run only on pushing a tag
190208
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
191209
needs: [lint, check, prepare-release-notes]
192210
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)