Skip to content

Commit

Permalink
Update and rename python-publish.yml to publish-to-test-pypi.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mwfarb authored Aug 1, 2023
1 parent e069b46 commit 2b660c0
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
# This workflow will upload a Python Package using Twine when a release is created
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
name: Upload Python Package
name: Publish Python distributions to PyPI and TestPyPI

on:
release:
types: [published]

permissions:
contents: read
on: push

jobs:
build-n-publish:
Expand All @@ -33,10 +28,13 @@ jobs:
--wheel
--outdir dist/
.
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
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@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}


0 comments on commit 2b660c0

Please sign in to comment.