-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement release workflow in GitHub actions
- heavily based on @webknjaz's work on https://github.com/cherrypy/cheroot/blob/b2c619f3e60682b9405a87cea48e8d30801b6048/.github/workflows/ci-cd.yml - create package before running tests, run tests against same package that will be published - run nightly tests - publish package to test pypi for commits to master - publish package to pypi using workflow_dispatch - create github tag and release after successful tests on workflow_dispatch - packaging version is set from `setuptools-scm` - self-reported `__version__` is dynamically determined using `pkg_resources` - pyroma is removed due to incompatibilities with `setuptools-scm`: regebro/pyroma#69
- Loading branch information
1 parent
bf8b11e
commit 35e5c26
Showing
12 changed files
with
802 additions
and
256 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
include LICENSE | ||
include CHANGES.txt | ||
include README.rst | ||
graft aiomysql | ||
global-exclude *.pyc *.swp | ||
exclude .coveragerc | ||
exclude .flake8 | ||
exclude .github | ||
exclude .gitignore | ||
exclude docker-compose.yml | ||
exclude docs | ||
exclude examples | ||
exclude requirements-dev.txt | ||
exclude tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=42", | ||
"setuptools_scm[toml]>=6.4", | ||
"wheel", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,11 @@ | ||
import os | ||
import re | ||
from setuptools import setup, find_packages | ||
from setuptools import setup | ||
|
||
|
||
def read(f): | ||
return open(os.path.join(os.path.dirname(__file__), f)).read().strip() | ||
|
||
|
||
def read_version(): | ||
regexp = re.compile(r"^__version__\W*=\W*'([\d.abrc]+)'") | ||
init_py = os.path.join(os.path.dirname(__file__), | ||
'aiomysql', '__init__.py') | ||
with open(init_py) as f: | ||
for line in f: | ||
match = regexp.match(line) | ||
if match is not None: | ||
return match.group(1) | ||
else: | ||
raise RuntimeError('Cannot find version in aiomysql/__init__.py') | ||
|
||
|
||
setup(version=read_version(), | ||
long_description='\n\n'.join((read('README.rst'), read('CHANGES.txt'))), | ||
packages=find_packages(exclude=['tests', 'tests.*'])) | ||
setup( | ||
long_description='\n\n'.join((read('README.rst'), read('CHANGES.txt'))), | ||
) |