Skip to content

Commit 31ee873

Browse files
chore: ensure github-actions detection by npm can work (#5842)
https://coveord.atlassian.net/browse/KIT-4720 and + some for Quantic, just playin' safe. Fix-it-twice maybe in vercel/turborepo#10740
1 parent 93f09ad commit 31ee873

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

turbo.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@
7373
},
7474
"release:phase3": {
7575
"dependsOn": ["^release:phase3"],
76-
"env": ["NODE_AUTH_TOKEN", "NPM_CONFIG_USERCONFIG"],
76+
"env": [
77+
"NODE_AUTH_TOKEN",
78+
"NPM_CONFIG_USERCONFIG",
79+
"ACTIONS_ID_TOKEN_REQUEST_URL",
80+
"ACTIONS_ID_TOKEN_REQUEST_TOKEN"
81+
],
7782
"cache": false
7883
}
7984
},
@@ -91,5 +96,6 @@
9196
"PR_NUMBER",
9297
"NODE_ENV",
9398
"CI"
94-
]
99+
],
100+
"globalPassThroughEnv": ["GITHUB_*", "RUNNER_*", "SFDX_*"]
95101
}

utils/ci/npm-publish-package.mjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ async function isPublished(name, version, tag = version) {
2727

2828
const isPrerelease = process.env.IS_PRERELEASE === 'true';
2929
const tagSuffix = process.env.TAG_SUFFIX || '';
30-
const shouldProvideProvenance =
31-
!isPrerelease &&
32-
process.env.npm_config_registry !== 'https://npm.pkg.github.com';
3330
/** @type {import('@npmcli/package-json').PackageJson} */
3431
const {name, version} = JSON.parse(
3532
readFileSync('package.json', {encoding: 'utf-8'})
@@ -43,7 +40,7 @@ if (!(await isPublished(name, version))) {
4340
: 'beta';
4441
await npmPublish('.', {
4542
tag: tagToPublish,
46-
provenance: shouldProvideProvenance,
43+
provenance: true,
4744
});
4845
} else {
4946
console.log(`Version ${version} is already published.`);

0 commit comments

Comments
 (0)