From 1979c6cd7abe3d5aa36679975ad95e64df84cea4 Mon Sep 17 00:00:00 2001 From: Doug Parker Date: Mon, 27 Feb 2023 15:57:06 -0800 Subject: [PATCH] Updates publish script to use new location for `@rules_prerender/declarative_shadow_dom` package. Also builds all the packages up front, so we don't publish one package and then discover that the label changed for second and fail part way through. --- .github/workflows/publish.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 9b40cc63..255eac3a 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -52,9 +52,16 @@ jobs: # Append NPM token to `.npmrc` file. echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" >> .npmrc - # Publish the package. + # Build all the packages to make sure they are buildable and the labels haven't + # changed. This helps prevent publishing one package and then failing to build + # the next one. + bazel build --config ci --config release \ + //:rules_prerender_pkg_publish \ + //packages/declarative_shadow_dom:pkg_publish + + # Publish the packages. bazel run --config ci --config release //:rules_prerender_pkg_publish - bazel run --config ci --config release //packages/rules_prerender/declarative_shadow_dom:pkg_publish + bazel run --config ci --config release //packages/declarative_shadow_dom:pkg_publish # Remove the token from the `.npmrc` file, it should no longer be needed. sed -i "/${{ secrets.NPM_ACCESS_TOKEN }}/d" .npmrc