From e8cee5a19cdaa1698606ae37afdc94cd6dbe95b9 Mon Sep 17 00:00:00 2001 From: Kevin Pearson Date: Fri, 10 Nov 2023 14:22:39 -0800 Subject: [PATCH] PR deploy --- .github/workflows/release-github.yml | 10 ++++++++-- src/js/version.mjs | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-github.yml b/.github/workflows/release-github.yml index d4d8764d1..7f495f57b 100644 --- a/.github/workflows/release-github.yml +++ b/.github/workflows/release-github.yml @@ -45,11 +45,17 @@ jobs: run: | echo 'NPM_DIST_TAG="--tag next"' >> $GITHUB_ENV echo "DOCS_TAG=next" >> $GITHUB_ENV + - name: Set feature branch tags + if: github.ref_name != 'main' && github.ref_name != 'next' && github.event_name != 'pull_request' + run: | + echo 'NPM_DIST_TAG=""' >> $GITHUB_ENV + echo "FEATURE_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV - name: Set PR tags if: github.ref_name != 'main' && github.ref_name != 'next' && github.event_name == 'pull_request' run: | echo 'NPM_DIST_TAG=""' >> $GITHUB_ENV echo "DOCS_TAG=${{ github.head_ref }}" >> $GITHUB_ENV + echo "FEATURE_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV - name: Release mono-artifact to GitHub if: (github.ref_name != 'main' && github.event_name != 'pull_request') || github.event_name == 'workflow_dispatch' env: @@ -63,8 +69,8 @@ jobs: - name: Build artifacts for feature branches if: github.ref_name != 'main' && github.ref_name != 'next' run: | - $(node ./src/js/version.mjs latest-prerelease ${{ github.ref_name }}) - npm version prerelease --preid ${{ github.ref_name }} --workspaces --git-tag-version false + $(node ./src/js/version.mjs latest-prerelease $FEATURE_BRANCH) + npm version prerelease --preid $FEATURE_BRANCH --workspaces --git-tag-version false npm run dist - name: Check if semantic-release created a build id: check_build diff --git a/src/js/version.mjs b/src/js/version.mjs index 91a3126ba..0e03ffab0 100644 --- a/src/js/version.mjs +++ b/src/js/version.mjs @@ -78,6 +78,7 @@ else if (task === 'validate') { } else if (task === 'latest-prerelease') { + console.log('Finding the latest prerelease') const prerelease = process.argv.shift() console.log('prerelease : ' + prerelease) exec("npm show @firebolt-js/sdk versions --json", (error, result, errlog) => {