@@ -18,6 +18,7 @@ dotenv.config();
1818// execSync(cmd);
1919
2020const isDev = process . argv . includes ( "--dev" ) ;
21+ const isGithubActions = process . env . GITHUB_ACTIONS === "true" ;
2122console . log ( "Dev mode: " + isDev ) ;
2223
2324async function main ( ) {
@@ -51,6 +52,8 @@ async function main() {
5152
5253 const versions = Object . keys ( content . versions ) . reverse ( ) ;
5354
55+ let versionsChecked = 0 ;
56+
5457 for ( let i = 0 ; i < versions . length ; i ++ ) {
5558 const version = versions [ i ] ;
5659 const prevVersion = versions [ i + 1 ] ;
@@ -60,6 +63,12 @@ async function main() {
6063 // skip next and experimental versions
6164 if ( version . includes ( "next" ) || version . includes ( "experimental" ) ) continue ;
6265
66+ if ( isGithubActions && versionsChecked >= 10 ) {
67+ console . log ( "Github Actions mode: limiting to 10 versions checked" ) ;
68+ break ;
69+ }
70+ versionsChecked ++ ;
71+
6372 /**
6473 * @type {{name:string, version:string, dist:{tarball:string}} }
6574 */
@@ -130,7 +139,7 @@ async function main() {
130139
131140 // copy components.json into API folder
132141 const componentsJson = join ( packageDir , "components.needle.json" ) ;
133- if ( existsSync ( componentsJson ) ) {
142+ if ( existsSync ( componentsJson ) ) {
134143 fs . copyFileSync ( componentsJson , join ( outputDirectoryFull , "components.needle.json" ) ) ;
135144 }
136145
0 commit comments