Skip to content

Commit

Permalink
chore: pypi deploy when generating tag
Browse files Browse the repository at this point in the history
  • Loading branch information
vinyguedess committed May 8, 2020
1 parent 9c78d2d commit 3f31409
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

name: OnAny Deploy

on:
release:
on: [release]

jobs:
build:
Expand Down Expand Up @@ -37,3 +36,14 @@ jobs:
run: |
pip install coverage
make citest
- name: Deploy on pypi
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = $PYPI_USERNAME" >> ~/.pypirc
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
pip install twine
make deploy
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
setup(
name="onany",
packages=["onany"],
version="0.1.3",
version=os.getenv("GITHUB_REF") \
.replace("refs/tags/v", ""),
license="MIT",
description="Event manager library",
long_description=readme,
Expand Down

0 comments on commit 3f31409

Please sign in to comment.