From bba149cbdd122dc7278693c91e4aa90703ca7894 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Mon, 7 Feb 2022 19:17:37 +0200 Subject: [PATCH] ci: improve comment on canary releases (#3486) --- .github/workflows/canary.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/canary.yaml b/.github/workflows/canary.yaml index d370561af6..79b1e8ef41 100644 --- a/.github/workflows/canary.yaml +++ b/.github/workflows/canary.yaml @@ -91,15 +91,17 @@ jobs: with: github-token: ${{secrets.GITHUB_TOKEN}} script: | - const npmTag = process.env.NPM_TAG; - const npmVersion = process.env.NPM_VERSION; - const npmURL = 'https://www.npmjs.com/package/graphql/v/' + npmVersion; github.rest.issues.createComment({ issue_number: process.env.PR_NUMBER, owner: context.repo.owner, repo: context.repo.repo, - body: - `The latest changes of this PR are available as ['graphql@${npmVersion}'](${npmURL}) on NPM.\n` + - '**Note: no gurantees provided so please use your own discretion.**\n\n' + - `Also you can depend on latest version built from this PR: \`npm install --save graphql@${npmTag}\`.`, + body: process.env.COMMENT_BODY, }) + env: + COMMENT_BODY: | + The latest changes of this PR are available on NPM as + [graphql@${{env.NPM_VERSION}}](https://www.npmjs.com/package/graphql/v/${{env.NPM_VERSION}}) + **Note: no gurantees provided so please use your own discretion.** + + Also you can depend on latest version built from this PR: + `npm install --save graphql@${{env.NPM_TAG}}`