From 49bb3471d87c05a2b4443f442b48c0cf2f2f60ed Mon Sep 17 00:00:00 2001 From: jeangovil Date: Mon, 9 Oct 2023 11:55:13 +0330 Subject: [PATCH] ci: update release-pr.yml workflow --- .github/workflows/release-pr.yml | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index d2b57c8..2097a12 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -122,20 +122,15 @@ jobs: - uses: actions/github-script@v6 id: pr + env: + CHANGES: ${{ steps.bump.outputs.changes }} with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | - const changes = "${{ steps.bump.outputs.changes }}"; const type = "${{ steps.release_type.outputs.value }}"; const head = "${{ steps.release_commit.outputs.head }}"; const title = "${{ steps.release_commit.outputs.message }}"; - const body = `This PR will bump the following packages:\n\`\`\`\n${changes}\n\`\`\`\n\nPlease review and test the code, before merging this PR. You can also check the changelog for more details on what has changed.\n\n**Warning**: Once you merge this PR, the changes will be published to the npm registry and cannot be undone. Please make sure you are confident about the quality and stability of the code before publishing.`; - - console.log(changes); - console.log(type); - console.log(head); - console.log(title); - console.log(body); + const body = `This PR will bump the following packages:\n\`\`\`\n${process.env.CHANGES}\n\`\`\`\n\nPlease review and test the code, before merging this PR. You can also check the changelog for more details on what has changed.\n\n**Warning**: Once you merge this PR, the changes will be published to the npm registry and cannot be undone. Please make sure you are confident about the quality and stability of the code before publishing.`; const res = await github.rest.pulls.create({ body, @@ -145,13 +140,3 @@ jobs: repo: context.repo.repo, owner: context.repo.owner, }); - - const { number } = res.data; - core.setOutput('number', number); - - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: number, - labels: [`${type}-release`], - });