@@ -7,17 +7,6 @@ import { resolve } from "node:path";
77const ref = process . env . GITHUB_REF || "" ;
88const sha = process . env . GITHUB_SHA || "" ;
99const eventPath = process . env . GITHUB_EVENT_PATH || "" ;
10- const forcePublish = process . env . FORCE_PUBLISH === "true" ;
11- console . log ( `GITHUB_REF=${ ref } ` ) ;
12- console . log ( `GITHUB_SHA=${ sha } ` ) ;
13- console . log ( `GITHUB_EVENT_PATH=${ eventPath } ` ) ;
14- console . log ( `FORCE_PUBLISH=${ forcePublish } ` ) ;
15- console . log (
16- `ACTIONS_ID_TOKEN_REQUEST_URL=${ process . env . ACTIONS_ID_TOKEN_REQUEST_URL ? "set" : "" } `
17- ) ;
18- console . log (
19- `ACTIONS_ID_TOKEN_REQUEST_TOKEN=${ process . env . ACTIONS_ID_TOKEN_REQUEST_TOKEN ? "set" : "" } `
20- ) ;
2110
2211const isTag = ref . startsWith ( "refs/tags/v" ) ;
2312const tagVersion = isTag ? ref . replace ( "refs/tags/v" , "" ) : null ;
@@ -66,7 +55,6 @@ const getChangedPaths = () => {
6655 try {
6756 const payload = JSON . parse ( readFileSync ( eventPath , "utf8" ) ) ;
6857 before = payload . before || "" ;
69- console . log ( `payload.before=${ before } ` ) ;
7058 } catch {
7159 console . warn ( "Failed to read GITHUB_EVENT_PATH payload" ) ;
7260 before = "" ;
@@ -76,7 +64,6 @@ const getChangedPaths = () => {
7664 if ( before && before !== EMPTY_SHA ) {
7765 try {
7866 const output = run ( `git diff --name-only ${ before } ${ sha } ` ) ;
79- console . log ( `git diff output:\n${ output } ` ) ;
8067 return output ? output . split ( "\n" ) : [ ] ;
8168 } catch {
8269 console . warn ( `git diff failed for ${ before } ..${ sha } ` ) ;
@@ -151,10 +138,6 @@ const publishPackage = ({ path, name }, shouldPublish) => {
151138 delete npmEnv . NODE_AUTH_TOKEN ;
152139 delete npmEnv . NPM_CONFIG_USERCONFIG ;
153140 delete npmEnv . npm_config_userconfig ;
154- console . log (
155- `npm_config_workspace=${ process . env . npm_config_workspace || "" } npm_config_workspaces=${ process . env . npm_config_workspaces || "" } `
156- ) ;
157- console . log ( `NPM_CONFIG_USERCONFIG=${ process . env . NPM_CONFIG_USERCONFIG || "" } ` ) ;
158141 const publishRoot = mkdtempSync ( join ( tmpdir ( ) , "rescript-mui-publish-" ) ) ;
159142 const tempPkgPath = join ( publishRoot , path ) ;
160143 cpSync ( path , tempPkgPath , { recursive : true } ) ;
@@ -170,18 +153,13 @@ const publishPackage = ({ path, name }, shouldPublish) => {
170153
171154const changedPaths = getChangedPaths ( ) ;
172155const changedMaterial =
173- forcePublish ||
174156 isTag ||
175157 changedPaths . some ( ( file ) =>
176158 file . startsWith ( "packages/rescript-mui-material/" )
177159 ) ;
178160const changedLab =
179- forcePublish ||
180161 isTag ||
181162 changedPaths . some ( ( file ) => file . startsWith ( "packages/rescript-mui-lab/" ) ) ;
182- console . log ( `changedPaths=${ changedPaths . length } ` ) ;
183- console . log ( `changedMaterial=${ changedMaterial } ` ) ;
184- console . log ( `changedLab=${ changedLab } ` ) ;
185163
186164publishPackage ( packages [ 0 ] , changedMaterial ) ;
187165publishPackage ( packages [ 1 ] , changedLab ) ;
0 commit comments