From ee7c687223c9940726b58c97c4ed4f3c5fadf786 Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Mon, 4 Mar 2024 11:15:49 +0200 Subject: [PATCH] chore(misc): remove double quotes other step --- .github/workflows/publish.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a932458ff3fb29..779def280f888a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -103,9 +103,8 @@ jobs: repo: context.repo.repo, pull_number: ${{ github.event.inputs.pr }}, }); - const branchRef = pr.data.head.ref.replace(/"/g, ''); // Remove double quotes - console.log(`Fetched PR branch name: ${branchRef}`); - return branchRef; + console.log(`Fetched PR details: ${pr.data.head.ref}`); + return pr.data.head.ref; - name: Generate version string for PR release if: github.event.inputs.pr @@ -130,9 +129,6 @@ jobs: const prMatch = prInput.match(/^\d+$/); let prReleaseVersion = ''; - - const prDetails = '${{ steps.pr_details.outputs.result }}'; - console.log(`PR details: ${prDetails}`); if (prMatch) { // prInput is valid (consists only of digits after potentially removing a leading hash) @@ -146,9 +142,17 @@ jobs: core.setOutput('pr_release_version', prReleaseVersion); + - name: Set Clean Branch Name + if: github.event.inputs.pr + run: echo "CLEAN_BRANCH_NAME=${{ steps.pr_details.outputs.result }}" | sed 's/"//g' >> $GITHUB_ENV + - uses: actions/checkout@v4 with: - ref: ${{ steps.pr_details.outputs.result }} + ref: ${{ env.CLEAN_BRANCH_NAME }} + + # - uses: actions/checkout@v4 + # with: + # ref: ${{ steps.pr_details.outputs.result }} - uses: pnpm/action-setup@v2 with: