diff --git a/.github/workflows/pre-release-types.yml b/.github/workflows/pre-release-types.yml index 8868243..40af274 100644 --- a/.github/workflows/pre-release-types.yml +++ b/.github/workflows/pre-release-types.yml @@ -118,8 +118,8 @@ jobs: INPUTS_BRANCH: ${{ github.event.inputs.branch }} run: | # Branch name sanitization added to avoid issues with npm version command - # Example `ci/new-branch` -> `ci-new-branch` - npm version prerelease --preid="${INPUTS_BRANCH//\//-}" + # Example `ci/new-branch-1.0.0` -> `ci-new-branch-1-0-0` + npm version prerelease --preid="$(echo "${INPUTS_BRANCH}" | sed -E 's@[/\.]@-@g')" - name: git add and commit new version if: ${{ github.event.inputs.branch != '' }} @@ -144,8 +144,8 @@ jobs: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc # Branch name sanitization added to avoid issues with npm version command - # Example `ci/new-branch` -> `ci-new-branch` - npm publish --tag "${INPUTS_BRANCH//\//-}" --access public + # Example `ci/new-branch-1.0.0` -> `ci-new-branch-1-0-0` + npm publish --tag "$(echo "${INPUTS_BRANCH}" | sed -E 's@[/\.]@-@g')" --access public - name: Publish rc to NPM if: ${{ github.event.inputs.branch == '' }}