Skip to content

Commit

Permalink
Merge pull request #12 from rosineygp/feat/auto-pypi
Browse files Browse the repository at this point in the history
chore: auto pypi release
  • Loading branch information
rosineygp committed Jul 10, 2021
2 parents 362ee3f + 5eec83f commit bf0294e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Upload Release Asset

on:
push:
tags:
- 'v*'
jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
pip install -r requirements.py
python setup.py sdist bdist_wheel
twine upload dist/*
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import os
from setuptools import setup

_github_ref = os.getenv("GITHUB_REF", "0.0.0").split("/")[-1]
_version = _github_ref.replace("v", "")

setup(
name='PyIsEven',
packages=['is_even'],
version='0.4.2',
version=_version,
license='MIT',
description='Check is a integer is even',
author='Rosiney Gomes Pereira',
Expand Down

0 comments on commit bf0294e

Please sign in to comment.