Prepare for automated publishing (#4055)

diff --git a/.github/workflows/post_summaries.yaml b/.github/workflows/post_summaries.yaml
new file mode 100644
index 0000000..2bbafa2
--- /dev/null
+++ b/.github/workflows/post_summaries.yaml
@@ -0,0 +1,17 @@
+# A CI configuration to write comments on PRs.
+
+name: Comment on the pull request
+permissions: read-all
+
+on:
+  workflow_run:
+    workflows: 
+      - Publish
+    types:
+      - completed
+
+jobs:
+  upload:
+    uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main
+    permissions:
+      pull-requests: write
diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
new file mode 100644
index 0000000..a10aec1
--- /dev/null
+++ b/.github/workflows/publish.yaml
@@ -0,0 +1,20 @@
+# A CI configuration to auto-publish pub packages.
+
+name: Publish
+permissions: read-all
+
+on:
+  pull_request:
+    branches: [ main ]
+    types: [opened, synchronize, reopened, labeled, unlabeled]
+  push:
+    tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]
+
+jobs:
+  publish:
+    uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
+    with:
+      write-comments: false
+    permissions:
+      id-token: write
+      pull-requests: write