From 4de7b7fb15a12a094f17f9465143a6ce23f631a8 Mon Sep 17 00:00:00 2001 From: venwork-dev Date: Sun, 22 Feb 2026 21:03:18 -0600 Subject: [PATCH] refactor(release): update release check logic in GitHub Actions workflow --- .changeset/large-banks-send.md | 5 +++++ .github/workflows/release.yml | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 .changeset/large-banks-send.md diff --git a/.changeset/large-banks-send.md b/.changeset/large-banks-send.md new file mode 100644 index 0000000..a14039a --- /dev/null +++ b/.changeset/large-banks-send.md @@ -0,0 +1,5 @@ +--- +"brand-shell": patch +--- + +update release check logic in GitHub Actions workflow diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 435b56c..6ac1eee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,14 +15,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - with: - fetch-depth: 0 - - name: Check if version needs publishing + - name: Check release mode id: check run: | - VERSION=$(node -p "require('./package.json').version") - if git tag --list "brand-shell@${VERSION}" | grep -qF "brand-shell@${VERSION}"; then + count=$(find .changeset -maxdepth 1 -name "*.md" ! -name "README.md" 2>/dev/null | wc -l | tr -d ' ') + if [ "$count" -gt 0 ]; then echo "publish_mode=false" >> "$GITHUB_OUTPUT" else echo "publish_mode=true" >> "$GITHUB_OUTPUT"