Skip to content

Commit f822fda

Browse files
committed
ci: Fix dry-run output handling in release workflow
Signed-off-by: Eden Reich <eden.reich@gmail.com>
1 parent 79999b4 commit f822fda

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ jobs:
4141
- name: Create a release if needed
4242
id: semantic
4343
run: |
44-
dry_run_output=$(semantic-release --dry-run | grep -i 'there are no relevant changes, so no new version is released')
45-
if [ $? -eq 0 ]; then
44+
dry_run_output=$(semantic-release --dry-run 2>&1 || true)
45+
echo "Dry run output: $dry_run_output"
46+
47+
# Check if there are no changes
48+
if $(echo "$dry_run_output" | grep -q "no new version is released"); then
4649
echo "No new release needed"
4750
echo "new_release_published=false" >> $GITHUB_OUTPUT
4851
exit 0

0 commit comments

Comments
 (0)