`publish --dry-run` informs that the server might do more checks (#2883)

diff --git a/lib/src/command/lish.dart b/lib/src/command/lish.dart
index bbb2373..4e77f8b 100644
--- a/lib/src/command/lish.dart
+++ b/lib/src/command/lish.dart
@@ -158,6 +158,7 @@
       overrideExitCode(exit_codes.DATA);
       return;
     } else if (dryRun) {
+      log.message('The server may enforce additional checks.');
       return;
     } else {
       await _publish(await packageBytesFuture);
diff --git a/test/goldens/directory_option.txt b/test/goldens/directory_option.txt
index 0465b6b..50c9120 100644
--- a/test/goldens/directory_option.txt
+++ b/test/goldens/directory_option.txt
@@ -68,6 +68,7 @@
 |-- lib
 |   '-- test_pkg.dart
 '-- pubspec.yaml
+The server may enforce additional checks.
 [ERR] 
 [ERR] Package has 0 warnings.
 
diff --git a/test/lish/dry_run_warns_about_server_checks.dart b/test/lish/dry_run_warns_about_server_checks.dart
new file mode 100644
index 0000000..ad7abe0
--- /dev/null
+++ b/test/lish/dry_run_warns_about_server_checks.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test/test.dart';
+
+import '../descriptor.dart' as d;
+import '../test_pub.dart';
+
+void main() {
+  test('--dry-run mentions that checks are not exhaustive', () async {
+    await d.validPackage.create();
+    await runPub(
+      args: ['publish', '--dry-run'],
+      output: contains('The server may enforce additional checks.'),
+    );
+  });
+}