Skip to content

Commit

Permalink
ci: Add support for pre-releases on PyPI
Browse files Browse the repository at this point in the history
Previously, we only built Linux and Windows binaries for pre-releases.
But we also want them to be published on PyPI.
  • Loading branch information
robin-nitrokey committed Aug 12, 2024
1 parent b9e1f93 commit e2cc245
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cd-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Continuous delivery - Pypi

on:
release:
types: [released]
types: [prereleased, released]

env:
FLIT_ROOT_INSTALL: 1
Expand All @@ -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 }}"
Expand Down Expand Up @@ -76,4 +76,4 @@ jobs:
- name: Publish release
run: |
. venv/bin/activate
flit --repository pypi publish
flit --repository pypi publish

0 comments on commit e2cc245

Please sign in to comment.