Skip to content

Commit d8aa5c4

Browse files
zimegClaude
andcommitted
fix: skip release workflow when docs already match next version
The release workflow re-triggers on main when its own PR merges, causing `make rc` to fail with "nothing to commit" since docs are already up to date. Check if the computed NEXT_VERSION already appears in the install docs before proceeding, and make the Makefile commit conditional as a defensive fallback. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent f0e47ee commit d8aa5c4

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ jobs:
8484
;;
8585
esac
8686
87+
# Skip if docs already reference this version
88+
if grep -q "Using slack v${NEXT_VERSION}" docs/guides/installing-the-slack-cli-for-mac-and-linux.md; then
89+
echo "Docs already at v$NEXT_VERSION, nothing to release"
90+
echo "has_changes=false" >> "$GITHUB_OUTPUT"
91+
exit 0
92+
fi
93+
8794
echo "has_changes=true" >> "$GITHUB_OUTPUT"
8895
echo "next=$NEXT_VERSION" >> "$GITHUB_OUTPUT"
8996
echo "semver=$SEMVER" >> "$GITHUB_OUTPUT"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ rc:
102102
git add docs/guides/installing-the-slack-cli-for-mac-and-linux.md
103103
git add docs/guides/installing-the-slack-cli-for-windows.md
104104
@printf "$(FONT_BOLD)Git Commit$(FONT_RESET)\n"
105-
git commit -m "chore: release slack-cli v$(RELEASE_VERSION)"
105+
git diff --cached --quiet || git commit -m "chore: release slack-cli v$(RELEASE_VERSION)"

0 commit comments

Comments
 (0)