Skip to content

Commit

Permalink
💚 Upload to pypi upon github release
Browse files Browse the repository at this point in the history
  • Loading branch information
MiWeiss authored Aug 16, 2023
1 parent e516107 commit 4e8db5c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI

on:
push:
branches:
- main
- v1
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
on:
release:
types: [published]

jobs:
build-n-publish:
Expand Down Expand Up @@ -34,14 +33,12 @@ jobs:
--outdir dist/
- name: Publish distribution 📦 to Test PyPI
if: startsWith(github.ref, 'refs/tags')
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 4e8db5c

Please sign in to comment.