Skip to content

added pypi-release rule #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Aug 6, 2020
24 changes: 24 additions & 0 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: PyPI-Release

on:
push:
branches:
- master

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.x"
- name: Install build dependencies
run: pip install -U setuptools wheel build
- name: Build
run: python -m build .
- name: Publish
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,5 @@ e.g.
pip install tox
tox -e reformat
```

For information on releasing version bumps see [RELEASING.md](RELEASING.md)
17 changes: 17 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Releasing CloudEvents SDK for Python

This repository is configured to automatically publish the corresponding [PyPI
package](https://pypi.org/project/cloudevents/) via GitHub Actions.

To release a new CloudEvents SDK, contributors should bump the `version` in
[setup.py](setup.py)) to reflect the new release version. On merge, the action
will automatically build and release to PyPI using
[this PyPI GitHub Action](https://github.com/pypa/gh-action-pypi-publish). This
action gets called on all pushes to master (such as a version branch being merged
into master), but only releases a new version when the version number has changed.

After a version update is merged, maintainers are expected to manually create a
corresponding tag/release.

View the GitHub workflow [pypi-release.yml](.github/workflows/pypi-release.yml) for
more information.
35 changes: 0 additions & 35 deletions release.sh

This file was deleted.

29 changes: 0 additions & 29 deletions setup.cfg

This file was deleted.

28 changes: 27 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,31 @@

import setuptools

import pathlib

setuptools.setup(setup_requires=["pbr>=2.0.0"], pbr=True)

here = pathlib.Path(__file__).parent.resolve()
long_description = (here / "README.md").read_text(encoding="utf-8")

setuptools.setup(
name="cloudevents",
summary="CloudEvents SDK Python",
long_description_content_type="text/markdown",
long_description=long_description,
author="The Cloud Events Contributors",
author_email="cncfcloudevents@gmail.com",
home_page="https://cloudevents.io",
classifiers=[
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
package_dir={"": "cloudevents"},
packages=["http", "sdk"],
version="1.0.0",
)