Skip to content

Commit

Permalink
fix(cli): upload GitHub assets issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Jan 29, 2023
1 parent 47a0d1a commit a302c9c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/src/pre-publish.ts
@@ -1,4 +1,4 @@
import { createReadStream, existsSync, statSync } from 'fs'
import { existsSync, statSync } from 'fs'
import { join } from 'path'

import { Octokit } from '@octokit/rest'
Expand All @@ -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')
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit a302c9c

Please sign in to comment.