You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/jsonnet/complete-workflows.jsonnet
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -12,18 +12,18 @@ local yarn = import 'yarn.jsonnet';
12
12
* 2. 'publish-prod' - Production package publishing on branch push
13
13
* 3. 'pr' - Pull request preview publishing and testing
14
14
*
15
-
* @param {array} [repositories=['gynzy']] - The repositories to publish to
15
+
* @param {array} [repositories=['github']] - The repositories to publish to
16
16
* @param {boolean} [isPublicFork=true] - Whether the repository is a public fork (affects runner selection)
17
17
* @param {boolean} [checkVersionBump=true] - Whether to assert if the version was bumped (recommended)
18
18
* @param {jobs} [testJob=null] - A job to be run during PR to assert tests. Can be an array of jobs
19
-
* @param {string} [branch='main'] - The branch to run the publish-prod job on
19
+
* @param {string} [branch='main'] - The branch that triggers the publish-prod job; publishes the package <VERSION> specified in package.json and sets latest tag
20
20
* @param {string} [packageManager='yarn'] - Package manager to use ('yarn' or 'pnpm')
21
21
* @param {string} [image=null] - Docker image override for publish jobs; null uses the PM-specific default
22
22
* @param {array} [buildSteps=null] - Build steps override; null uses the PM-specific default. Pass `[]` to skip build.
23
23
* @returns {workflows} - Complete set of GitHub Actions workflows for JavaScript package lifecycle
24
24
*/
25
25
workflowJavascriptPackage(
26
-
repositories=['gynzy'],
26
+
repositories=['github'],
27
27
isPublicFork=true,
28
28
checkVersionBump=true,
29
29
testJob=null,
@@ -37,8 +37,8 @@ local yarn = import 'yarn.jsonnet';
37
37
else [base.step('build', 'yarn build')];
38
38
local effectiveBuildSteps = if buildSteps != nullthen buildSteps else defaultBuildSteps;
39
39
local publishJob = if packageManager == 'pnpm'
40
-
then pnpm.pnpmPublishJob(repositories=repositories, runsOn=runsOn, image=image, buildSteps=effectiveBuildSteps)
@@ -201,6 +202,7 @@ local yarn = import 'yarn.jsonnet';
201
202
ref='${{ github.event.pull_request.head.sha }}',
202
203
setupPnpm=setupPnpm,
203
204
pnpmInstallArgs=pnpmInstallArgs,
205
+
source=source,
204
206
blobless=blobless,
205
207
retryAttempts=retryAttempts,
206
208
cloneTimeout=cloneTimeout,
@@ -217,9 +219,15 @@ local yarn = import 'yarn.jsonnet';
217
219
*
218
220
* @param {boolean} [isPr=true] - Whether this is a PR build (affects versioning)
219
221
* @param {string} [ifClause=null] - Conditional expression to determine if step should run
222
+
* @param {string} [publishBranch=null] - The branch that triggers the publish-prod job; publishes the package <VERSION> specified in package.json and sets latest tag. When null, defaults to `main`/`master`
220
223
* @returns {steps} - Array containing a single step object
@@ -264,12 +272,13 @@ local yarn = import 'yarn.jsonnet';
264
272
* @param {boolean} isPr - Whether this is a PR build (affects versioning)
265
273
* @param {array} repositories - List of repository types ('gynzy' or 'github')
266
274
* @param {string} [ifClause=null] - Conditional expression to determine if steps should run
275
+
* @param {string} [publishBranch=null] - The branch that triggers the publish-prod job; publishes the package <VERSION> specified in package.json and sets latest tag. When null, defaults to `main`/`master`
267
276
* @returns {steps} - Array of step objects for publishing to all repositories
* @param {array} [buildSteps=null] - Build steps; null defaults to `[pnpm run build]`. Pass `[]` to skip build.
330
-
* @param {array} [repositories=['gynzy']] - List of repositories to publish to
339
+
* @param {array} [repositories=['github']] - List of repositories to publish to
331
340
* @param {boolean|string} [onChangedFiles=false] - Whether to only run on changed files (or glob pattern)
332
341
* @param {string} [changedFilesHeadRef=null] - Head reference for changed files comparison
333
342
* @param {string} [changedFilesBaseRef=null] - Base reference for changed files comparison
334
343
* @param {string} [ifClause=null] - Conditional expression to determine if job should run
335
344
* @param {string} [runsOn=null] - Runner type to use
345
+
* @param {string} [publishBranch=null] - The branch that triggers the publish-prod job; publishes the package <VERSION> specified in package.json and sets latest tag. When null, defaults to `main`/`master`
336
346
* @returns {jobs} - GitHub Actions job definition
337
347
*/
338
348
pnpmPublishJob(
339
349
image='mirror.gcr.io/node:24',
340
350
useCredentials=false,
341
351
gitCloneRef='${{ github.sha }}',
342
352
buildSteps=null,
343
-
repositories=['gynzy'],
353
+
repositories=['github'],
344
354
onChangedFiles=false,
345
355
changedFilesHeadRef=null,
346
356
changedFilesBaseRef=null,
347
357
ifClause=null,
348
358
runsOn=null,
359
+
publishBranch=null,
349
360
)::
350
361
local effectiveBuildSteps = if buildSteps == nullthen [base.step('build', 'pnpm run build')] else buildSteps;
351
362
local stepIfClause = (if onChangedFiles != falsethen"steps.changes.outputs.package == 'true'"elsenull);
@@ -358,7 +369,7 @@ local yarn = import 'yarn.jsonnet';
0 commit comments