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('/', '-')) }