diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..639275c8 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Publish to PyPI + +on: + release: + types: [created] + +jobs: + build: + 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: pip install setuptools wheel twine + - name: Build package + run: python setup.py sdist bdist_wheel + - name: Publish package + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: twine upload dist/* diff --git a/.pypirc b/.pypirc new file mode 100644 index 00000000..26dae235 --- /dev/null +++ b/.pypirc @@ -0,0 +1,8 @@ +[distutils] +index-servers = + pypi + +[pypi] +username = your-username +password = your-password + diff --git a/README.md b/README.md index 9a775010..98020d6e 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,14 @@ For those unfamiliar with Brazilian financial/regulatory entities: --- ## Updates +## Installation + +You can install the package using pip: + +```bash +pip install bancos_brasileiros +``` + The data is automatically updated daily using a [tool](https://github.com/guibranco/BancosBrasileiros-MergeTool) that collects information from lists of official sources. diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..b8a79a28 --- /dev/null +++ b/setup.py @@ -0,0 +1,19 @@ +from setuptools import find_packages, setup + +setup( + name="bancos_brasileiros", + version="0.1.0", + author="Author Name", + author_email="author@example.com", + description="A description of the project", + long_description=open("README.md").read(), + long_description_content_type="text/markdown", + url="https://github.com/username/repo", + packages=find_packages(), + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], + python_requires=">=3.6", +)