ci: autogenerate documentation for the bcr
diff --git a/.bcr/source.template.json b/.bcr/source.template.json index 2037471..2c98ecf 100644 --- a/.bcr/source.template.json +++ b/.bcr/source.template.json
@@ -1,5 +1,6 @@ { "integrity": "", "strip_prefix": "{REPO}-{VERSION}", + "docs_url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{TAG}.docs.tar.gz", "url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{TAG}.tar.gz" }
diff --git a/.github/workflows/release_prep.sh b/.github/workflows/release_prep.sh index 2eaa9d6..e4ec773 100755 --- a/.github/workflows/release_prep.sh +++ b/.github/workflows/release_prep.sh
@@ -9,6 +9,15 @@ PREFIX="rules_doxygen-${TAG}" ARCHIVE="rules_doxygen-$TAG.tar.gz" git archive --format=tar --prefix="${PREFIX}/" "${TAG}" | gzip > "$ARCHIVE" + +# Add generated API docs to the release, see https://github.com/bazelbuild/bazel-central-registry/issues/5593 +docs="$(mktemp -d)"; targets="$(mktemp)" +bazel --output_base="$docs" query --output=label --output_file="$targets" 'kind("starlark_doc_extract rule", //docs/...)' +bazel --output_base="$docs" build --target_pattern_file="$targets" --remote_download_regex='.*doc_extract\.binaryproto' +tar --create --auto-compress \ + --directory "$(bazel --output_base="$docs" info bazel-bin)" \ + --file "$GITHUB_WORKSPACE/${ARCHIVE%.tar.gz}.docs.tar.gz" . + SHA=$(shasum -a 256 "$ARCHIVE" | awk '{print $1}') cat << EOF
diff --git a/CHANGELOG.md b/CHANGELOG.md index 09d514d..2f60643 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ ### Changed - Bump in the version of multiple dependencies, to accommodate for incompatible flags and ease future migrations +- Autogenerate documentation for the bcr ## [2.5.0]