File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,11 @@ jobs:
109109 with :
110110 node-version : " 18"
111111 registry-url : " https://registry.npmjs.org"
112+ - name : Force registry for scoped npm package
113+ run : echo "@eggl-js:registry=https://registry.npmjs.org/" >> ~/.npmrc
112114
113115 - name : Publish to npmjs.org
114- run : npm publish
116+ run : npm publish --access public
115117 env :
116118 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
117119
@@ -137,6 +139,7 @@ jobs:
137139 with :
138140 node-version : " 18"
139141 registry-url : " https://npm.pkg.github.com"
142+ scope : " @robert27"
140143
141144 - name : Set scope for GitHub Packages
142145 run : |
Original file line number Diff line number Diff line change @@ -32,7 +32,14 @@ async function downloadFileAsync(
3232 try {
3333 logger . info ( `Downloading from URL: ${ url } ` ) ;
3434
35- const isGitHubApiUrl = url . includes ( "api.github.com" ) ;
35+ let isGitHubApiUrl = false ;
36+ try {
37+ const parsedUrl = new URL ( url ) ;
38+ isGitHubApiUrl = parsedUrl . hostname === "api.github.com" ;
39+ } catch {
40+ // Invalid URL format, treat as non-GitHub
41+ isGitHubApiUrl = false ;
42+ }
3643
3744 const headers : Record < string , string > = {
3845 Accept : "application/octet-stream" ,
You can’t perform that action at this time.
0 commit comments