From 1d9514e53102b118ed1ad8f970daa9b51153f38f Mon Sep 17 00:00:00 2001 From: Ankur Datta <64993082+ankur-arch@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:29:59 +0600 Subject: [PATCH] fix(custom): add VERSION env variable --- .github/workflows/preview-publish.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/preview-publish.yml b/.github/workflows/preview-publish.yml index 444a504..6d61b7a 100644 --- a/.github/workflows/preview-publish.yml +++ b/.github/workflows/preview-publish.yml @@ -62,13 +62,14 @@ jobs: run: | VERSION="0.0.0-pr-${{ github.event.pull_request.number }}-$(git rev-parse --short HEAD)" echo "Preview release version: $VERSION" - echo "version=$VERSION" >> $GITHUB_ENV + echo "VERSION=$VERSION" >> $GITHUB_ENV # Step 11: Create a preview release - name: Publish Preview Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_NUXT_TOKEN }} + VERSION: ${{ env.VERSION }} run: | - echo "Publishing preview release ${{ env.version }}" - npx semantic-release --no-ci --branches main --tag-format "v${{version}}-pr-${{ github.event.pull_request.number }}-$(git rev-parse --short HEAD)" + echo "Publishing preview release $VERSION" + npx semantic-release --no-ci --branches main --tag-format "v${VERSION}"