diff --git a/.copier-answers.yml b/.copier-answers.yml index 76f9c13dc2..878df0ca3f 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -12,6 +12,6 @@ docs_type: sphinx git_platform: github.com github_org: bluesky package_name: ophyd_async -pypi: false +pypi: true repo_name: ophyd-async type_checker: pyright diff --git a/.github/workflows/_pypi.yml b/.github/workflows/_pypi.yml new file mode 100644 index 0000000000..0c5258dbee --- /dev/null +++ b/.github/workflows/_pypi.yml @@ -0,0 +1,17 @@ +on: + workflow_call: + +jobs: + upload: + runs-on: ubuntu-latest + environment: release + + steps: + - name: Download dist artifact + uses: actions/download-artifact@v4 + with: + name: dist + path: dist + + - name: Publish to PyPI using trusted publishing + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e2531ba8c..cf5bc80bbc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,13 @@ jobs: if: needs.check.outputs.branch-pr == '' uses: ./.github/workflows/_dist.yml + pypi: + if: github.ref_type == 'tag' + needs: dist + uses: ./.github/workflows/_pypi.yml + permissions: + id-token: write + release: if: github.ref_type == 'tag' needs: [dist, docs] diff --git a/README.md b/README.md index ca9e7349c1..9b145c5e06 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![CI](https://github.com/bluesky/ophyd-async/actions/workflows/ci.yml/badge.svg)](https://github.com/bluesky/ophyd-async/actions/workflows/ci.yml) [![Coverage](https://codecov.io/gh/bluesky/ophyd-async/branch/main/graph/badge.svg)](https://codecov.io/gh/bluesky/ophyd-async) +[![PyPI](https://img.shields.io/pypi/v/ophyd-async.svg)](https://pypi.org/project/ophyd-async) [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) # ophyd_async @@ -10,8 +11,10 @@ Asynchronous Bluesky hardware abstraction code, compatible with control systems This is where you should write a short paragraph that describes what your module does, how it does it, and why people should use it. +<<<<<<< before updating | Source | | | :-----------: | :-----------------------------------------------: | +| PyPI | `pip install ophyd-async` | | Documentation | | | Releases | |