diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e9359cb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: Distribution +on: + push: + branches-ignore: ["*"] + tags: ["*"] + +jobs: + upload-package: + name: "Build & upload package" + runs-on: ubuntu-latest + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && github.repository == 'sprockets/sprockets-statsd' + steps: + - uses: actions/checkout@v2 + - name: Install python + uses: actions/setup-python@v2 + with: + python-version: 3.7 # use 3.7 for wheel compatibility + - name: Install builder + run: | + python -m pip install --upgrade build pip setuptools twine + - name: Build distributions + run: | + python -m build --sdist --wheel --outdir dist/ . + - name: Upload packages + uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + user: __token__ + password: ${{ secrets.PYPI_PASSWORD }} + skip_existing: true # just in case... diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b0f0765 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=42"] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg index b90bd16..72d8d51 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,6 +3,7 @@ name = sprockets-statsd version = attr: sprockets_statsd.version description = Asynchronously send metrics to a statsd instance. long_description = file: README.rst +long_description_content_type = text/x-rst license = BSD 3-Clause License url = https://sprockets-statsd.readthedocs.io/ project_urls: @@ -13,7 +14,7 @@ author = Dave Shawley author_email = daveshawley@gmail.com classifiers = Development Status :: 1 - Planning - Indended Audience :: Developers + Intended Audience :: Developers License :: OSI Approved :: BSD License Natural Language :: English Operating System :: OS Independent @@ -51,6 +52,10 @@ readthedocs = exclude = tests +[options.package_data] +sprockets_statsd = + py.typed + [build_sphinx] build_dir = build/sphinx nitpicky = 1 diff --git a/sprockets_statsd/__init__.py b/sprockets_statsd/__init__.py index d6bcd66..e569d99 100644 --- a/sprockets_statsd/__init__.py +++ b/sprockets_statsd/__init__.py @@ -1,2 +1,2 @@ -version_info = (0, 0, 0) +version_info = (0, 0, 1) version = '.'.join(str(c) for c in version_info) diff --git a/sprockets_statsd/py.typed b/sprockets_statsd/py.typed new file mode 100644 index 0000000..e69de29