From 049c5c87e39363e53a4db18ab3d91fff623513ea Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 25 Oct 2024 21:38:29 +0100 Subject: [PATCH] Add automated release process --- .github/workflows/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3143aff..38f1903 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,6 +4,8 @@ on: push: branches: - main + tags: + - '**' pull_request: concurrency: @@ -91,3 +93,23 @@ jobs: with: name: html-report path: htmlcov + + release: + needs: [coverage] + if: success() && startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-24.04 + environment: release + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v3 + + - name: Build + run: uv build + + - uses: pypa/gh-action-pypi-publish@release/v1