diff --git a/scripts/create_release_branch.sh b/scripts/create_release_branch.sh
index 22da38f..06764e1 100755
--- a/scripts/create_release_branch.sh
+++ b/scripts/create_release_branch.sh
@@ -5,7 +5,14 @@ echo "Preparing release $VERSION"
# Update .csproj file
# This regex to update Version tag in .csproj file
-sed -i '' 's|\(.*\)|'"${VERSION}"'|g' src/stream-net.csproj
+# Detect OS and use appropriate sed syntax
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ # macOS/BSD sed
+ sed -i '' 's|\(.*\)|'"${VERSION}"'|g' src/stream-net.csproj
+else
+ # Linux/GNU sed
+ sed -i 's|\(.*\)|'"${VERSION}"'|g' src/stream-net.csproj
+fi
# Create changelog