Skip to content

Commit c5345df

Browse files
ci: fix deprecation of canary package (#3496)
1 parent 8a9658f commit c5345df

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

.github/workflows/canary.yaml

+4-9
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ jobs:
5454
packageJSON.version += packageJSON.version.includes('-') ? '.' : '-';
5555
packageJSON.version += `canary.pr.${pull_request.number}.${pull_request.head.sha}`;
5656
57+
packageJSON.deprecated =
58+
`You are using canary version build from ${pull_request.url}, no gurantees provided so please use your own discretion.`;
59+
5760
assert(
5861
packageJSON.scripts == null,
5962
'No scripts allowed for security reasons!',
@@ -65,20 +68,12 @@ jobs:
6568
'utf-8',
6669
);
6770
68-
core.exportVariable('PR_URL', pull_request.url);
6971
core.exportVariable('PR_NUMBER', pull_request.number);
7072
core.exportVariable('NPM_TAG', packageJSON.publishConfig.tag);
7173
core.exportVariable('NPM_VERSION', packageJSON.version);
7274
7375
- name: Publish NPM package
74-
run: npm publish ./npmDist
75-
env:
76-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
77-
78-
- name: Add deprecate message on NPM package
79-
run: |
80-
npm deprecate "graphql@$NPM_VERSION" \
81-
"You are using canary version build from $PR_URL, no gurantees provided so please use your own discretion."
76+
run: npm publish --ignore-scripts ./npmDist
8277
env:
8378
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8479

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
# run: npm ls --depth 999
8484

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

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

0 commit comments

Comments
 (0)