From 190b6a14f7651efeffb61807264ba714efa813e3 Mon Sep 17 00:00:00 2001 From: Anna Wen <54281166+annawen1@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:33:42 -0400 Subject: [PATCH] chore(cdn-workflow): update to use package.json version --- .github/workflows/publish-web-components-cdn.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-web-components-cdn.yml b/.github/workflows/publish-web-components-cdn.yml index 735ff26766bc..6c5143b1e5c7 100644 --- a/.github/workflows/publish-web-components-cdn.yml +++ b/.github/workflows/publish-web-components-cdn.yml @@ -35,6 +35,11 @@ jobs: - name: Check release type if: contains(github.ref_name, '-rc.') run: echo "PRE_RELEASE=true" >> $GITHUB_ENV + - name: Get version of web components from package.json + id: package-version + uses: martinbeentjes/npm-get-version-action@v1.3.1 + with: + path: packages/web-components # If tag is a release candidate, upload the CDN artifacts to the `next` tag folder # ie. https://1.www.s81c.com/common/carbon/web-components/tag/next/breadcrumb.min.js @@ -81,5 +86,4 @@ jobs: AWS_REGION: ${{ secrets.COMMON_COS_REGION }} AWS_S3_ENDPOINT: https://${{ secrets.COMMON_COS_ENDPOINT }} SOURCE_DIR: 'packages/web-components/dist' - DEST_DIR: - 'common/carbon/web-components/version/${{ github.ref_name }}' + DEST_DIR: 'common/carbon/web-components/version/v${{steps.package-version.outputs.current-version}}'