From e34faf433eae6960c2c43a18e2c94e58a8b6e1d4 Mon Sep 17 00:00:00 2001 From: avifenesh Date: Mon, 27 May 2024 15:56:05 +0000 Subject: [PATCH] updated to run tests also in real release --- .github/workflows/npm-cd.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm-cd.yml b/.github/workflows/npm-cd.yml index b5779e13a4..06f7e5e21c 100644 --- a/.github/workflows/npm-cd.yml +++ b/.github/workflows/npm-cd.yml @@ -321,12 +321,25 @@ jobs: sudo npm install -g typescript npx tsc -p ./tsconfig.json + - name: Check if RC and set a distribution tag for the package + shell: bash + run: | + if [[ "${GITHUB_REF:11}" == *"rc"* ]] + then + echo "This is a release candidate" + export npm_tag="next" + else + echo "This is a stable release" + export npm_tag="latest" + fi + echo "NPM_TAG=${npm_tag}" >> $GITHUB_ENV + - name: Run the tests shell: bash working-directory: ./utils/release-candidate-testing/node run: | npm install - npm install --no-save @aws/glide-for-redis@next + npm install --no-save @aws/glide-for-redis@${{ env.NPM_TAG }} npm run test # Reset the repository to make sure we get the clean checkout of the action later in other actions.