Skip to content

Commit 1730088

Browse files
author
liaoruikang
committed
chore: the --no-git-checks configuration item is added when publishing in the CI environment
1 parent 1a58111 commit 1730088

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ jobs:
2525
- name: Install deps
2626
run: pnpm install
2727
- name: publish
28-
run: pnpm release --provenance
28+
run: pnpm release
2929
env:
3030
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

scripts/release.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import pc from 'picocolors';
1010
import { cmp } from 'semver';
1111

1212
const {
13-
values: { tag, 'skip-build': skipBuild, registry, provenance },
13+
values: { tag, 'skip-build': skipBuild, registry },
1414
positionals
1515
} = parseArgs({
1616
args: argv.slice(2),
@@ -21,9 +21,6 @@ const {
2121
registry: {
2222
type: 'string'
2323
},
24-
provenance: {
25-
type: 'boolean'
26-
},
2724
'skip-build': {
2825
type: 'boolean'
2926
}
@@ -67,7 +64,7 @@ const publish = async (id: string) => {
6764
'--access',
6865
'public',
6966
...(registry ? ['--registry', registry] : []),
70-
...(provenance ? ['--provenance'] : [])
67+
...(process.env.CI ? ['--provenance', '--no-git-checks'] : [])
7168
],
7269
{
7370
cwd: id

0 commit comments

Comments
 (0)