Add workflow to publish a release to the bcr. (#998)

* Add the workflow to publish a release to the bcr.
- Update .bcr metadata template
- Update .bcr test matrix to drop bazel 7
diff --git a/.bcr/README.md b/.bcr/README.md
index 44ae7fe..4cc4f60 100644
--- a/.bcr/README.md
+++ b/.bcr/README.md
@@ -1,8 +1,7 @@
 # Bazel Central Registry
 
 When the ruleset is released, we want it to be published to the
-Bazel Central Registry automatically:
-<https://registry.bazel.build>
+Bazel Central Registry: <https://registry.bazel.build>
 
 This folder contains configuration files to automate the publish step.
 See <https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md>
diff --git a/.bcr/config.yml b/.bcr/config.yml
index b40ed20..758894c 100644
--- a/.bcr/config.yml
+++ b/.bcr/config.yml
@@ -1,3 +1,3 @@
 fixedReleaser:
-  login: aiuto
-  email: aiuto@google.com
+  login: tonyaiuto
+  email: tony@aiuto.dev
diff --git a/.bcr/metadata.template.json b/.bcr/metadata.template.json
index fc840c6..ac6a700 100644
--- a/.bcr/metadata.template.json
+++ b/.bcr/metadata.template.json
@@ -1,12 +1,16 @@
 {
-    "homepage": "https://github.com/bazelbuild/rules_pkg",
-    "maintainers": [
-	    {
-		    "email": "aiuto@datadoghq.com",
-		    "name": "Tony Aiuto"
-	    }
-    ],
-    "repository": ["github:bazelbuild/rules_pkg"],
-    "versions": [],
-    "yanked_versions": {}
+  "homepage": "https://github.com/bazelbuild/rules_pkg",
+  "maintainers": [
+    {
+      "email": "tony@aiuto.dev",
+      "name": "Tony Aiuto",
+      "github": "aiuto",
+      "github_user_id": "3044252"
+   }
+  ],
+  "repository": [
+    "github:bazelbuild/rules_pkg"
+  ],
+  "versions": [],
+  "yanked_versions": {}
 }
diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml
index 5897036..69c1140 100644
--- a/.bcr/presubmit.yml
+++ b/.bcr/presubmit.yml
@@ -1,17 +1,18 @@
-build_targets: &build_targets
-- '@rules_pkg//...'
-# Re-enable those targets when toolchain registration is supported.
-- '-@rules_pkg//toolchains/...'
-- '-@rules_pkg//pkg:make_rpm'
-
-platforms:
-  centos7_java11_devtoolset10:
-    build_targets: *build_targets
-  debian10:
-    build_targets: *build_targets
-  macos:
-    build_targets: *build_targets
-  ubuntu2204:
-    build_targets: *build_targets
-  windows:
-    build_targets: *build_targets
+matrix:
+  platform:
+  - debian10
+  - ubuntu2004
+  - macos
+  - macos_arm64
+  - windows
+  bazel:
+  - 8.x
+tasks:
+  verify_targets:
+    name: Verify build targets
+    platform: ${{ platform }}
+    bazel: ${{ bazel }}
+    build_targets:
+    - '@rules_pkg//...'
+    - '-@rules_pkg//toolchains/...'
+    - '-@rules_pkg//pkg:make_rpm'
diff --git a/.bcr/source.template.json b/.bcr/source.template.json
index 7ea619a..54c9271 100644
--- a/.bcr/source.template.json
+++ b/.bcr/source.template.json
@@ -1,4 +1,4 @@
 {
-    "integrity": "**leave this alone**",
+    "integrity": "",
     "url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_pkg-{TAG}.tar.gz"
 }
diff --git a/.github/workflows/publish_to_bcr.yml b/.github/workflows/publish_to_bcr.yml
new file mode 100644
index 0000000..a168844
--- /dev/null
+++ b/.github/workflows/publish_to_bcr.yml
@@ -0,0 +1,31 @@
+name: "Publish release to BCR"
+
+on:
+  workflow_dispatch:
+    inputs:
+      version:
+        required: true
+        type: "string"
+
+permissions:
+  id-token: write
+  attestations: write
+  contents: write
+
+jobs:
+  publish:
+    name: "Publish to BCR"
+
+    permissions:
+      attestations: write
+      contents: write
+      id-token: write
+
+    uses: "bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.1.0"
+    with:
+      tag_name: "${{ inputs.version }}"
+      tag_prefix: ""
+      registry_fork: "bazel-contrib/bazel-central-registry"
+      draft: false
+    secrets:
+      publish_token: "${{ secrets.BCR_PUBLISH_TOKEN }}"