From e3dd88f65c9cb2b0a44f8594a3bd49a2d73f3645 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 27 Oct 2024 22:25:06 +0000 Subject: [PATCH] Add automated release process (#272) --- .github/workflows/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e33f911..155f891 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,6 +4,8 @@ on: push: branches: - main + tags: + - '**' pull_request: concurrency: @@ -44,3 +46,23 @@ jobs: - name: Run tox targets for ${{ matrix.python-version }} run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .) + + release: + needs: [tests] + 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