From b57d62b5cb40d106822bc8b5a20dccd6d2fe7c14 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 12 Oct 2024 21:57:29 +0100 Subject: [PATCH] Add automated release process (#359) --- .github/workflows/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a688323..dbbb377 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,6 +4,8 @@ on: push: branches: - main + tags: + - '**' pull_request: concurrency: @@ -90,3 +92,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