From e2cc2459e2dbe63fafe2a67d19a9141d470b4fd5 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 12 Aug 2024 16:51:41 +0200 Subject: [PATCH] ci: Add support for pre-releases on PyPI Previously, we only built Linux and Windows binaries for pre-releases. But we also want them to be published on PyPI. --- .github/workflows/cd-pypi.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd-pypi.yaml b/.github/workflows/cd-pypi.yaml index 31abf7b1..f4618598 100644 --- a/.github/workflows/cd-pypi.yaml +++ b/.github/workflows/cd-pypi.yaml @@ -2,7 +2,7 @@ name: Continuous delivery - Pypi on: release: - types: [released] + types: [prereleased, released] env: FLIT_ROOT_INSTALL: 1 @@ -17,7 +17,7 @@ jobs: - name: Check version tag format run: | TAG_VERSION="${{ github.event.release.tag_name }}" - if [[ $TAG_VERSION =~ ^v[0-9]+.[0-9]+.[0-9]+$ ]]; then exit 0; else exit 1; fi + if [[ $VERSION_TAG =~ ^v[0-9]+.[0-9]+.[0-9]+(-rc\.[1-9])?$ ]]; then exit 0; else exit 1; fi - name: Check if version tag and package version are equal run: | TAG_VERSION="${{ github.event.release.tag_name }}" @@ -76,4 +76,4 @@ jobs: - name: Publish release run: | . venv/bin/activate - flit --repository pypi publish \ No newline at end of file + flit --repository pypi publish