From 0b8fcfc7ba0b51597efe29ab40acb9d115ca6f51 Mon Sep 17 00:00:00 2001 From: Misal Raj Date: Mon, 14 Jun 2021 15:07:57 +0530 Subject: [PATCH 1/2] added pypi release workflow --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..dd483c9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +# This workflows will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Upload Python Package + +on: + release: + types: [published] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.7' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: publish to PyPI + if: github.event_name != 'pull_request' + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* \ No newline at end of file From ea32e1df1d7e8e4d01e588d432408f0b7d63f620 Mon Sep 17 00:00:00 2001 From: Misal Raj Date: Mon, 14 Jun 2021 15:09:00 +0530 Subject: [PATCH 2/2] added pypi release workflow --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dd483c9..6085cbf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,4 +31,5 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | python setup.py sdist bdist_wheel - twine upload dist/* \ No newline at end of file + twine upload dist/* + \ No newline at end of file