Add config files

This commit is contained in:
AlberLC
2022-01-11 22:31:10 +01:00
parent 99853339c2
commit 91eb7408fa
3 changed files with 77 additions and 0 deletions

41
.github/workflows/publish.yaml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Publish
on:
release:
types: [published]
jobs:
publish-pip:
runs-on: ubuntu-latest
steps:
- name: Clone and checkout branch
uses: actions/checkout@v1
- name: Set up Python version
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install build and twine
run: pip install -U build twine
- name: Update setup.cfg
run: |
sed -i "
s/{project_name}/${{ github.event.repository.name }}/g;
s/{project_version}/${{ github.ref_name }}/g;
s/{author}/${{ github.repository_owner }}/g;
s/{description}/${{ github.event.repository.description }}/g
" setup.cfg
- name: Build package
run: python -m build
- name: Check binaries
run: twine check dist/*
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

6
pyproject.toml Normal file
View File

@@ -0,0 +1,6 @@
[build-system]
requires = [
'setuptools',
'wheel'
]
build-backend = 'setuptools.build_meta'

30
setup.cfg Normal file
View File

@@ -0,0 +1,30 @@
[metadata]
name = {project_name}
version = {project_version}
author = {author}
author_email = alberlc@outlook.com
description = {description}
long_description = file: README.rst
url = https://github.com/{author}/{project_name}
project_urls =
Bug Tracker = https://github.com/{author}/{project_name}/issues
classifiers =
Programming Language :: Python :: 3.10
License :: OSI Approved :: MIT License
Operating System :: OS Independent
[options]
packages = find_namespace:
include_package_data = True
python_requires = >=3.10
install_requires =
flanaapis
flanautils
multibot
plotly
[options.packages.find]
include = {project_name}*
[options.package_data]
* = *