Skip to content

Commit

Permalink
Update publish-to-test-pypi.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
msbentley authored Jan 10, 2024
1 parent bd56f6d commit 768973d
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Publish to PyPi and TestPyPi
name: Publish tagged versions to PyPi

on: push

jobs:
build-n-publish:
name: Build and publish to PyPI and TestPyPI
name: Publish tagged versions to PyPi
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.x

- name: Install pypa/build
run: >-
Expand All @@ -30,15 +30,8 @@ jobs:
--outdir dist/
.
- name: Publish distribution to Test PyPI
if: "!startsWith(github.ref, 'refs/tags')"
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 768973d

Please sign in to comment.