Skip to content

Commit

Permalink
ci: fix deprecation of canary package (#3496)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Feb 11, 2022
1 parent 8a9658f commit c5345df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/canary.yaml
Expand Up @@ -54,6 +54,9 @@ jobs:
packageJSON.version += packageJSON.version.includes('-') ? '.' : '-';
packageJSON.version += `canary.pr.${pull_request.number}.${pull_request.head.sha}`;
packageJSON.deprecated =
`You are using canary version build from ${pull_request.url}, no gurantees provided so please use your own discretion.`;
assert(
packageJSON.scripts == null,
'No scripts allowed for security reasons!',
Expand All @@ -65,20 +68,12 @@ jobs:
'utf-8',
);
core.exportVariable('PR_URL', pull_request.url);
core.exportVariable('PR_NUMBER', pull_request.number);
core.exportVariable('NPM_TAG', packageJSON.publishConfig.tag);
core.exportVariable('NPM_VERSION', packageJSON.version);
- name: Publish NPM package
run: npm publish ./npmDist
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Add deprecate message on NPM package
run: |
npm deprecate "graphql@$NPM_VERSION" \
"You are using canary version build from $PR_URL, no gurantees provided so please use your own discretion."
run: npm publish --ignore-scripts ./npmDist
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -83,7 +83,7 @@ jobs:
# run: npm ls --depth 999

- name: Run npm install
run: npm install --force --package-lock-only --ignore-scripts --engine-strict --strict-peer-deps
run: npm install --ignore-scripts --force --package-lock-only --engine-strict --strict-peer-deps

- name: Check that package-lock.json is in sync with package.json
run: git diff --exit-code package-lock.json
Expand Down

0 comments on commit c5345df

Please sign in to comment.