Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: improve comment on canary releases #3486

Merged
merged 1 commit into from Feb 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/canary.yaml
Expand Up @@ -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}}`