From 3e30b1db7e1c9d9e88ffeedbe9b9a69b7992e314 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Wed, 30 Oct 2024 15:41:30 +0100 Subject: [PATCH] Revert afdeaf5a6 and 8271b2d80 --- .github/workflows/readme_sync.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/readme_sync.yml b/.github/workflows/readme_sync.yml index b842c4fa82..b387dbb622 100644 --- a/.github/workflows/readme_sync.yml +++ b/.github/workflows/readme_sync.yml @@ -45,15 +45,9 @@ jobs: id: version-getter run: | VERSION="$(hatch version | cut -d '.' -f 1,2)" - # The first stable documentation on Readme for a version is created when - # the first x.x.0 version is released. - # Up until that point we need to push to an "-unstable" suffixed version. - # This also means that following RCs for patch releases are pushed to the - # stable docs, for the time being we're ok with that. - # `main` branch docs will be handled correctly too and get pushed to an - # unstable documentation. - IS_UNSTABLE="$(hatch version | grep -v -q '0-rc')" - if [ "$IS_UNSTABLE" ]; then + CURRENT_BRANCH="${{ github.ref_name }}" + # If we're on `main` branch we should push docs to the unstable version + if [ "$CURRENT_BRANCH" = "main" ]; then VERSION="$VERSION-unstable" fi echo "version=$VERSION" >> "$GITHUB_OUTPUT"