Skip to content

Commit

Permalink
Setup github actions for PyPI releases (Fix #12) (#23)
Browse files Browse the repository at this point in the history
* Setup github actions for pkg releases

* Add job and runs-in tag

* Rename git secret variables in workflow

* Add checkout branch action

* Use python3 setup.py

* Install setuptools before sdist build

* Install wheel before setup

* Remove branch reference from the workflow
  • Loading branch information
umesh-timalsina authored Aug 3, 2020
1 parent a9800dd commit 2cafbfb
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish ele to PyPI and TestPyPI

on:
push:
branches:
- master
release:
types:
- published


jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Build dist
run: |
pip3 install setuptools wheel
python3 setup.py sdist bdist_wheel
- name: Publish ele to TestPyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TEST_PYPI_PASSWORD }}
repository_url: https://test.pypi.org/legacy/

- name: Publish ele to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
if: github.event_name == 'release'

0 comments on commit 2cafbfb

Please sign in to comment.