From 1737f38df1330fb8c4898b1b525f8bfe5371bd6a Mon Sep 17 00:00:00 2001 From: Kevin Pearson Date: Fri, 10 Nov 2023 14:32:02 -0800 Subject: [PATCH] PR deploy --- .github/workflows/release-github.yml | 5 +++-- src/js/version.mjs | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-github.yml b/.github/workflows/release-github.yml index f176a7773..bd8cc1e21 100644 --- a/.github/workflows/release-github.yml +++ b/.github/workflows/release-github.yml @@ -69,8 +69,9 @@ jobs: - name: Build artifacts for feature branches if: github.ref_name != 'main' && github.ref_name != 'next' run: | - node ./src/js/version.mjs latest-prerelease $FEATURE_BRANCH - npm version prerelease --preid $FEATURE_BRANCH --workspaces --git-tag-version false + PRERELEASE=$(node ./src/js/version.mjs branch-to-prerelease $FEATURE_BRANCH) + node ./src/js/version.mjs latest-prerelease $PRERELEASE + npm version prerelease --preid $PRERELEASE --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 0e03ffab0..4cfc75696 100644 --- a/src/js/version.mjs +++ b/src/js/version.mjs @@ -101,4 +101,7 @@ else if (task === 'validate') { } return null }); +} else if (task === 'branch-to-prerelease') { + const branch = process.argv.shift() + console.log(branch.replace('/', '-')) }