fix(cli): upload GitHub assets issue
This commit is contained in:
parent
47a0d1af3b
commit
a302c9cb18
1 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
import { createReadStream, existsSync, statSync } from 'fs'
|
||||
import { existsSync, statSync } from 'fs'
|
||||
import { join } from 'path'
|
||||
|
||||
import { Octokit } from '@octokit/rest'
|
||||
|
@ -9,6 +9,7 @@ import { getNapiConfig } from './consts'
|
|||
import { debugFactory } from './debug'
|
||||
import { spawn } from './spawn'
|
||||
import { updatePackageJson } from './update-package'
|
||||
import { readFileAsync } from './utils'
|
||||
import { VersionCommand } from './version'
|
||||
|
||||
const debug = debugFactory('prepublish')
|
||||
|
@ -114,7 +115,7 @@ export class PrePublishCommand extends Command {
|
|||
'content-type': 'application/octet-stream',
|
||||
},
|
||||
// @ts-expect-error
|
||||
data: createReadStream(dstPath),
|
||||
data: await readFileAsync(dstPath),
|
||||
})
|
||||
console.info(`${chalk.green(dstPath)} upload success`)
|
||||
console.info(
|
||||
|
|
Loading…
Reference in a new issue