Commit f5d7261 1 parent a2e2c45 commit f5d7261 Copy full SHA for f5d7261
File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -138,14 +138,12 @@ ${commits.join('\n')}`).join('\n')
138
138
// Publish npm artifact
139
139
const pkgJson = fs . readJSONSync ( './package.json' )
140
140
if ( ! pkgJson . private ) {
141
+ const aliases = [ pkgJson . version , PKG_ALIAS || pkgJson . alias ] . flat ( 1 ) . filter ( Boolean )
141
142
const npmrc = path . resolve ( process . cwd ( ) , '.npmrc' )
142
143
const npmjsRegistry = 'https://registry.npmjs.org/'
143
- console . log ( `npm publish to ${ npmjsRegistry } ` )
144
- await $ `npm publish --no-git-tag-version --registry=${ npmjsRegistry } --userconfig ${ npmrc } `
145
144
146
- const alias = PKG_ALIAS || pkgJson . alias
147
- if ( alias ) {
148
- console . log ( `npm publish ${ alias } to ${ npmjsRegistry } ` )
145
+ for ( const alias of aliases ) {
146
+ console . log ( `npm publish ${ alias } ${ pkgJson . version } to ${ npmjsRegistry } ` )
149
147
await $ `echo "\`jq '.name="${ alias } "' package.json\`" > package.json`
150
148
await $ `npm publish --no-git-tag-version --registry=${ npmjsRegistry } --userconfig ${ npmrc } `
151
149
}
You can’t perform that action at this time.
0 commit comments