Skip to content

Commit

Permalink
chore: use release-please and publish to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesGuthrie committed Sep 20, 2023
1 parent d2806e6 commit 2de14cc
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 12 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
push:
branches:
- main

permissions:
id-token: write
contents: write
pull-requests: write

name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: python
bump-minor-pre-major: true # for pre-1.0.0, breaking changes are a minor bump
pull-request-header: ":robot: Release ready"
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]'

publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install pypa/build
run: python -m pip install build --user

- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
12 changes: 2 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,9 @@ Rule-based recommendations about your timeseries database.
Installation
------------

To install this package, first make sure that you have a recent
version of ``setuptools``::
You can install ``timescale-doctor`` using ``pip``::

pip install --upgrade setuptools

After that, you can use ``pip`` to install the package directly from
this directory::

pip install .

The tool is installed as ``timescale-doctor``.
pip install timescale-doctor

Running the tool
----------------
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get_version(rel_path: str) -> str:


setup(
name = "doctor",
name = "timescale-doctor",
version = get_version("src/doctor/__init__.py"),
author = "Mats Kindahl",
author_email = "[email protected]",
Expand All @@ -62,7 +62,7 @@ def get_version(rel_path: str) -> str:
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache 2 License",
"License :: OSI Approved :: Apache Software License",
"Topic :: Utilities",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
Expand Down

0 comments on commit 2de14cc

Please sign in to comment.