Skip to content

Commit

Permalink
Update pypublish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishiraj0100 authored Oct 14, 2021
1 parent 6b4dd76 commit 0de4065
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/pypublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

name: Upload Python Package

on: push

on:
release:
types: [published]

jobs:
deploy:
Expand All @@ -28,13 +29,7 @@ jobs:
pip install build twine setuptools
- name: Build package
run: python -m build
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_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
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 0de4065

Please sign in to comment.