Skip to content

Commit

Permalink
Publish to testpypi only when manually testing
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewyates committed Jun 30, 2024
1 parent f5d70cb commit 0108c02
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Python distribution to PyPI and TestPyPI
name: Publish Python distribution

on: push

Expand Down Expand Up @@ -92,26 +92,27 @@ jobs:
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
publish-to-testpypi:
name: Publish Python distribution to TestPyPI
needs:
- build
runs-on: ubuntu-latest
### Uncomment to publish to testpypi on every commit
# publish-to-testpypi:
# name: Publish Python distribution to TestPyPI
# needs:
# - build
# runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/trecrun
# environment:
# name: testpypi
# url: https://test.pypi.org/p/trecrun

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
# permissions:
# id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
# steps:
# - name: Download all the dists
# uses: actions/download-artifact@v3
# with:
# name: python-package-distributions
# path: dist/
# - name: Publish distribution to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/

0 comments on commit 0108c02

Please sign in to comment.