From e7d34b8b6c6e1057bb3f86b509938295bc05a7f6 Mon Sep 17 00:00:00 2001 From: Josh Wilson Date: Thu, 30 May 2024 15:08:31 +0900 Subject: [PATCH] ci: allow for feature branch releases via stable- naming --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7448c4c3e3..5e79bc0aeb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ concurrency: on: push: branches: - - stable + - stable* - alpha* - beta* - rc* @@ -51,7 +51,7 @@ jobs: - name: provide network versioning shell: bash run: | - if [[ "$GITHUB_REF_NAME" != "main" && "$GITHUB_REF_NAME" != "stable" && "$GITHUB_REF_NAME" != "alpha" && "$GITHUB_REF_NAME" != "beta" ]]; then + if [[ "$GITHUB_REF_NAME" != "main" && ! "$GITHUB_REF_NAME" =~ ^stable && "$GITHUB_REF_NAME" != "alpha" && "$GITHUB_REF_NAME" != "beta" ]]; then echo "NETWORK_VERSION_MODE=restricted" >> $GITHUB_ENV fi @@ -140,7 +140,7 @@ jobs: # only publish if we're on the stable branch - name: Conditionally remove 'publish = false' from workspace in release-plz.toml on stable branch - if: github.ref_name == 'stable' + if: startsWith(github.ref_name, 'stable') run: | ls -la sed -i '/^\[workspace\]/,/^\[/ {/^publish = false$/d;}' ./release-plz.toml