From ca49693bd607c2d2f7958ae778d9133a74b03599 Mon Sep 17 00:00:00 2001 From: Maurizio Cacace Date: Wed, 1 Feb 2023 10:29:07 +0100 Subject: [PATCH] AAE-12452 - Version published in NPM should have PR number id in the name not gh-run_id (#8218) * AAE-11884 change tag sha action (#8118) * AAE-12452 change npm id --- .github/workflows/release.yml | 33 ++++++++++++++++++++++----------- scripts/next_version.sh | 2 +- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d093df31fa..8bd9b8e185 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,9 +79,9 @@ jobs: with: fetch-depth: 0 - uses: ./.github/actions/setup - with: + with: enable-cache: false - enable-node-modules-cache: false + enable-node-modules-cache: false - name: install run: | npm ci @@ -102,13 +102,13 @@ jobs: - run: git fetch --all - id: set-dryrun uses: ./.github/actions/enable-dryrun - with: + with: dry-run-flag: ${{ inputs.dry-run-release }} - uses: ./.github/actions/setup - with: + with: enable-cache: false enable-node-modules-cache: false - - uses: ./.github/actions/download-cache-and-artifacts + - uses: ./.github/actions/download-cache-and-artifacts - name: release Demoshell docker run: | nx build demoshell --configuration production @@ -128,10 +128,10 @@ jobs: - run: git fetch --all - id: set-dryrun uses: ./.github/actions/enable-dryrun - with: + with: dry-run-flag: ${{ inputs.dry-run-release }} - uses: ./.github/actions/setup - with: + with: enable-cache: false enable-node-modules-cache: false act: ${{ inputs.dry-run-release }} @@ -139,7 +139,7 @@ jobs: - name: release Storybook docker run: | nx run stories:build-storybook --configuration ci - . ./scripts/travis/release/docker-tag.sh + . ./scripts/travis/release/docker-tag.sh ./scripts/travis/release/release-storybook-docker.sh ${{ steps.set-dryrun.outputs.dryrun }} release-npm: @@ -153,14 +153,25 @@ jobs: with: fetch-depth: 0 - uses: ./.github/actions/setup - with: + with: enable-cache: false enable-node-modules-cache: false - id: set-dryrun uses: ./.github/actions/enable-dryrun - with: - dry-run-flag: ${{ inputs.dry-run-release }} + with: + dry-run-flag: ${{ inputs.dry-run-release }} - uses: ./.github/actions/download-cache-and-artifacts + - name: check PR number + id: action + uses: kamatama41/get-pr-number-action@v0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: save PR number + env: + GH_TOKEN: ${{ github.token }} + shell: bash + run: | + echo "PR_NUMBER=${{ steps.action.outputs.number }}" >> $GITHUB_ENV - name: build libraries run: | set -u; diff --git a/scripts/next_version.sh b/scripts/next_version.sh index 5b23176c70..f91367dca0 100755 --- a/scripts/next_version.sh +++ b/scripts/next_version.sh @@ -82,7 +82,7 @@ fi if [[ "${EXEC_ALPHA}" == true ]] then - NEXT_VERSION=${NEXT_VERSION}-${TRAVIS_BUILD_NUMBER} + NEXT_VERSION=${NEXT_VERSION}-${PR_NUMBER} fi if [[ "${EXEC_BETA}" == true ]]