From 790e8f7f44d3d92126375d3ad389e47d3463b25e Mon Sep 17 00:00:00 2001 From: Egor Spirin Date: Mon, 1 Mar 2021 20:06:11 +0300 Subject: [PATCH] Update CI pipeline for correct publishing --- .github/workflows/publish.yml | 5 ++++- setup.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1d51a08..ef348cb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,8 +1,10 @@ name: Publish Python 🐍 distributions 📦 to PyPI +# Publish to Test PyPI in case of pushing into the master +# Publish to PyPI in case of releasing + on: push: - branches: [ master ] jobs: build-n-publish: @@ -22,6 +24,7 @@ jobs: run: | python -m build --sdist --wheel --outdir dist/ . - name: Publish distribution 📦 to Test PyPI + if: github.ref == 'refs/heads/master' uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} diff --git a/setup.py b/setup.py index c7f8582..0647b80 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -VERSION = "0.0.1" +VERSION = "0.0.2" with open("README.md") as readme_file: readme = readme_file.read()