@@ -110,13 +110,13 @@ export default async (pluginConfig, context) => {
110110 if ( target === "generic_package" ) {
111111 // Upload generic packages
112112 const encodedVersion = encodeURIComponent ( version ) ;
113- const encodedChannel = encodeURIComponent ( packageName ) ;
113+ const encodedPackageName = encodeURIComponent ( packageName ) ;
114114 const fileName = pathlib . basename ( path ) ;
115115 const encodedLabel = encodeURIComponent ( label ?? fileName ) ;
116116 // https://docs.gitlab.com/ee/user/packages/generic_packages/#publish-a-package-file
117117 uploadEndpoint = urlJoin (
118118 projectApiUrl ,
119- `packages/generic/${ encodedChannel } /${ encodedVersion } /${ encodedLabel } ?${
119+ `packages/generic/${ encodedPackageName } /${ encodedVersion } /${ encodedLabel } ?${
120120 status ? `status=${ status } &` : ""
121121 } select=package_file`
122122 ) ;
@@ -131,9 +131,12 @@ export default async (pluginConfig, context) => {
131131 }
132132
133133 // https://docs.gitlab.com/ee/user/packages/generic_packages/#download-package-file
134- const url = urlJoin ( projectApiUrl , `packages/generic/${ encodedChannel } /${ encodedVersion } /${ encodedLabel } ` ) ;
134+ const url = urlJoin (
135+ projectApiUrl ,
136+ `packages/generic/${ encodedPackageName } /${ encodedVersion } /${ encodedLabel } `
137+ ) ;
135138
136- assetsList . push ( { label, alt : "release" , url, type : "package" , filepath } ) ;
139+ assetsList . push ( { label, alt : packageName , url, type : "package" , filepath } ) ;
137140
138141 logger . log ( "Uploaded file: %s (%s)" , url , response . file . url ) ;
139142 } else {
0 commit comments