projen 0.79.4__py3-none-any.whl → 0.98.25__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,6 @@
1
+ from pkgutil import extend_path
2
+ __path__ = extend_path(__path__, __name__)
3
+
1
4
  import abc
2
5
  import builtins
3
6
  import datetime
@@ -8,7 +11,22 @@ import jsii
8
11
  import publication
9
12
  import typing_extensions
10
13
 
11
- from typeguard import check_type
14
+ import typeguard
15
+ from importlib.metadata import version as _metadata_package_version
16
+ TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
17
+
18
+ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
19
+ if TYPEGUARD_MAJOR_VERSION <= 2:
20
+ return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
21
+ else:
22
+ if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
23
+ pass
24
+ else:
25
+ if TYPEGUARD_MAJOR_VERSION == 3:
26
+ typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
27
+ typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
28
+ else:
29
+ typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
12
30
 
13
31
  from .._jsii import *
14
32
 
@@ -33,6 +51,7 @@ from ..github.workflows import (
33
51
  jsii_struct_bases=[],
34
52
  name_mapping={
35
53
  "major_version": "majorVersion",
54
+ "environment": "environment",
36
55
  "min_major_version": "minMajorVersion",
37
56
  "minor_version": "minorVersion",
38
57
  "npm_dist_tag": "npmDistTag",
@@ -46,6 +65,7 @@ class BranchOptions:
46
65
  self,
47
66
  *,
48
67
  major_version: jsii.Number,
68
+ environment: typing.Optional[builtins.str] = None,
49
69
  min_major_version: typing.Optional[jsii.Number] = None,
50
70
  minor_version: typing.Optional[jsii.Number] = None,
51
71
  npm_dist_tag: typing.Optional[builtins.str] = None,
@@ -56,6 +76,7 @@ class BranchOptions:
56
76
  '''(experimental) Options for a release branch.
57
77
 
58
78
  :param major_version: (experimental) The major versions released from this branch.
79
+ :param environment: (experimental) The GitHub Actions environment used for the release. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. When multiple artifacts are released, the environment can be overwritten on a per artifact basis. Default: - no environment used, unless set at the artifact level
59
80
  :param min_major_version: (experimental) The minimum major version to release.
60
81
  :param minor_version: (experimental) The minor versions released from this branch.
61
82
  :param npm_dist_tag: (experimental) The npm distribution tag to use for this branch. Default: "latest"
@@ -68,6 +89,7 @@ class BranchOptions:
68
89
  if __debug__:
69
90
  type_hints = typing.get_type_hints(_typecheckingstub__6f62eb98000deee3820f046309b2262c5063c0cb9581232fd1a44731f86986d7)
70
91
  check_type(argname="argument major_version", value=major_version, expected_type=type_hints["major_version"])
92
+ check_type(argname="argument environment", value=environment, expected_type=type_hints["environment"])
71
93
  check_type(argname="argument min_major_version", value=min_major_version, expected_type=type_hints["min_major_version"])
72
94
  check_type(argname="argument minor_version", value=minor_version, expected_type=type_hints["minor_version"])
73
95
  check_type(argname="argument npm_dist_tag", value=npm_dist_tag, expected_type=type_hints["npm_dist_tag"])
@@ -77,6 +99,8 @@ class BranchOptions:
77
99
  self._values: typing.Dict[builtins.str, typing.Any] = {
78
100
  "major_version": major_version,
79
101
  }
102
+ if environment is not None:
103
+ self._values["environment"] = environment
80
104
  if min_major_version is not None:
81
105
  self._values["min_major_version"] = min_major_version
82
106
  if minor_version is not None:
@@ -100,6 +124,23 @@ class BranchOptions:
100
124
  assert result is not None, "Required property 'major_version' is missing"
101
125
  return typing.cast(jsii.Number, result)
102
126
 
127
+ @builtins.property
128
+ def environment(self) -> typing.Optional[builtins.str]:
129
+ '''(experimental) The GitHub Actions environment used for the release.
130
+
131
+ This can be used to add an explicit approval step to the release
132
+ or limit who can initiate a release through environment protection rules.
133
+
134
+ When multiple artifacts are released, the environment can be overwritten
135
+ on a per artifact basis.
136
+
137
+ :default: - no environment used, unless set at the artifact level
138
+
139
+ :stability: experimental
140
+ '''
141
+ result = self._values.get("environment")
142
+ return typing.cast(typing.Optional[builtins.str], result)
143
+
103
144
  @builtins.property
104
145
  def min_major_version(self) -> typing.Optional[jsii.Number]:
105
146
  '''(experimental) The minimum major version to release.
@@ -322,6 +363,7 @@ class CodeArtifactOptions:
322
363
  jsii_type="projen.release.CommonPublishOptions",
323
364
  jsii_struct_bases=[],
324
365
  name_mapping={
366
+ "github_environment": "githubEnvironment",
325
367
  "post_publish_steps": "postPublishSteps",
326
368
  "pre_publish_steps": "prePublishSteps",
327
369
  "publish_tools": "publishTools",
@@ -331,14 +373,16 @@ class CommonPublishOptions:
331
373
  def __init__(
332
374
  self,
333
375
  *,
376
+ github_environment: typing.Optional[builtins.str] = None,
334
377
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
335
378
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
336
379
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
337
380
  ) -> None:
338
381
  '''(experimental) Common publishing options.
339
382
 
383
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
340
384
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
341
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
385
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
342
386
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
343
387
 
344
388
  :stability: experimental
@@ -347,10 +391,13 @@ class CommonPublishOptions:
347
391
  publish_tools = _Tools_75b93a2a(**publish_tools)
348
392
  if __debug__:
349
393
  type_hints = typing.get_type_hints(_typecheckingstub__9603f09b67279d5ef3dc921367168d873983210161b1d6382c369d0b9ec13b0a)
394
+ check_type(argname="argument github_environment", value=github_environment, expected_type=type_hints["github_environment"])
350
395
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
351
396
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
352
397
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
353
398
  self._values: typing.Dict[builtins.str, typing.Any] = {}
399
+ if github_environment is not None:
400
+ self._values["github_environment"] = github_environment
354
401
  if post_publish_steps is not None:
355
402
  self._values["post_publish_steps"] = post_publish_steps
356
403
  if pre_publish_steps is not None:
@@ -358,6 +405,22 @@ class CommonPublishOptions:
358
405
  if publish_tools is not None:
359
406
  self._values["publish_tools"] = publish_tools
360
407
 
408
+ @builtins.property
409
+ def github_environment(self) -> typing.Optional[builtins.str]:
410
+ '''(experimental) The GitHub Actions environment used for publishing.
411
+
412
+ This can be used to add an explicit approval step to the release
413
+ or limit who can initiate a release through environment protection rules.
414
+
415
+ Set this to overwrite a package level publishing environment just for this artifact.
416
+
417
+ :default: - no environment used, unless set at the package level
418
+
419
+ :stability: experimental
420
+ '''
421
+ result = self._values.get("github_environment")
422
+ return typing.cast(typing.Optional[builtins.str], result)
423
+
361
424
  @builtins.property
362
425
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
363
426
  '''(experimental) Steps to execute after executing the publishing command.
@@ -374,7 +437,7 @@ class CommonPublishOptions:
374
437
 
375
438
  @builtins.property
376
439
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
377
- '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede.
440
+ '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed.
378
441
 
379
442
  These steps are executed after ``dist/`` has been populated with the build
380
443
  output.
@@ -409,10 +472,55 @@ class CommonPublishOptions:
409
472
  )
410
473
 
411
474
 
475
+ @jsii.data_type(
476
+ jsii_type="projen.release.ContinuousReleaseOptions",
477
+ jsii_struct_bases=[],
478
+ name_mapping={"paths": "paths"},
479
+ )
480
+ class ContinuousReleaseOptions:
481
+ def __init__(
482
+ self,
483
+ *,
484
+ paths: typing.Optional[typing.Sequence[builtins.str]] = None,
485
+ ) -> None:
486
+ '''
487
+ :param paths: (experimental) Paths for which pushes should trigger a release.
488
+
489
+ :stability: experimental
490
+ '''
491
+ if __debug__:
492
+ type_hints = typing.get_type_hints(_typecheckingstub__95b36779f92c5190c3ac9d8a636a537bfe6ebc844a55942ee5dfc0a9656d6192)
493
+ check_type(argname="argument paths", value=paths, expected_type=type_hints["paths"])
494
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
495
+ if paths is not None:
496
+ self._values["paths"] = paths
497
+
498
+ @builtins.property
499
+ def paths(self) -> typing.Optional[typing.List[builtins.str]]:
500
+ '''(experimental) Paths for which pushes should trigger a release.
501
+
502
+ :stability: experimental
503
+ '''
504
+ result = self._values.get("paths")
505
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
506
+
507
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
508
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
509
+
510
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
511
+ return not (rhs == self)
512
+
513
+ def __repr__(self) -> str:
514
+ return "ContinuousReleaseOptions(%s)" % ", ".join(
515
+ k + "=" + repr(v) for k, v in self._values.items()
516
+ )
517
+
518
+
412
519
  @jsii.data_type(
413
520
  jsii_type="projen.release.GitHubReleasesPublishOptions",
414
521
  jsii_struct_bases=[CommonPublishOptions],
415
522
  name_mapping={
523
+ "github_environment": "githubEnvironment",
416
524
  "post_publish_steps": "postPublishSteps",
417
525
  "pre_publish_steps": "prePublishSteps",
418
526
  "publish_tools": "publishTools",
@@ -425,6 +533,7 @@ class GitHubReleasesPublishOptions(CommonPublishOptions):
425
533
  def __init__(
426
534
  self,
427
535
  *,
536
+ github_environment: typing.Optional[builtins.str] = None,
428
537
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
429
538
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
430
539
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -434,8 +543,9 @@ class GitHubReleasesPublishOptions(CommonPublishOptions):
434
543
  ) -> None:
435
544
  '''(experimental) Publishing options for GitHub releases.
436
545
 
546
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
437
547
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
438
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
548
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
439
549
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
440
550
  :param changelog_file: (experimental) The location of an .md file (relative to ``dist/``) that includes the changelog for the release.
441
551
  :param release_tag_file: (experimental) The location of a text file (relative to ``dist/``) that contains the release tag.
@@ -447,6 +557,7 @@ class GitHubReleasesPublishOptions(CommonPublishOptions):
447
557
  publish_tools = _Tools_75b93a2a(**publish_tools)
448
558
  if __debug__:
449
559
  type_hints = typing.get_type_hints(_typecheckingstub__c7008ba35b00dedc375d87db7a317e8f077475b6a4e334303337c92bb77171fb)
560
+ check_type(argname="argument github_environment", value=github_environment, expected_type=type_hints["github_environment"])
450
561
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
451
562
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
452
563
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
@@ -458,6 +569,8 @@ class GitHubReleasesPublishOptions(CommonPublishOptions):
458
569
  "release_tag_file": release_tag_file,
459
570
  "version_file": version_file,
460
571
  }
572
+ if github_environment is not None:
573
+ self._values["github_environment"] = github_environment
461
574
  if post_publish_steps is not None:
462
575
  self._values["post_publish_steps"] = post_publish_steps
463
576
  if pre_publish_steps is not None:
@@ -465,6 +578,22 @@ class GitHubReleasesPublishOptions(CommonPublishOptions):
465
578
  if publish_tools is not None:
466
579
  self._values["publish_tools"] = publish_tools
467
580
 
581
+ @builtins.property
582
+ def github_environment(self) -> typing.Optional[builtins.str]:
583
+ '''(experimental) The GitHub Actions environment used for publishing.
584
+
585
+ This can be used to add an explicit approval step to the release
586
+ or limit who can initiate a release through environment protection rules.
587
+
588
+ Set this to overwrite a package level publishing environment just for this artifact.
589
+
590
+ :default: - no environment used, unless set at the package level
591
+
592
+ :stability: experimental
593
+ '''
594
+ result = self._values.get("github_environment")
595
+ return typing.cast(typing.Optional[builtins.str], result)
596
+
468
597
  @builtins.property
469
598
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
470
599
  '''(experimental) Steps to execute after executing the publishing command.
@@ -481,7 +610,7 @@ class GitHubReleasesPublishOptions(CommonPublishOptions):
481
610
 
482
611
  @builtins.property
483
612
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
484
- '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede.
613
+ '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed.
485
614
 
486
615
  These steps are executed after ``dist/`` has been populated with the build
487
616
  output.
@@ -701,13 +830,13 @@ class GitPublishOptions:
701
830
  jsii_type="projen.release.GoPublishOptions",
702
831
  jsii_struct_bases=[CommonPublishOptions],
703
832
  name_mapping={
833
+ "github_environment": "githubEnvironment",
704
834
  "post_publish_steps": "postPublishSteps",
705
835
  "pre_publish_steps": "prePublishSteps",
706
836
  "publish_tools": "publishTools",
707
837
  "git_branch": "gitBranch",
708
838
  "git_commit_message": "gitCommitMessage",
709
839
  "github_deploy_key_secret": "githubDeployKeySecret",
710
- "github_repo": "githubRepo",
711
840
  "github_token_secret": "githubTokenSecret",
712
841
  "github_use_ssh": "githubUseSsh",
713
842
  "git_user_email": "gitUserEmail",
@@ -718,13 +847,13 @@ class GoPublishOptions(CommonPublishOptions):
718
847
  def __init__(
719
848
  self,
720
849
  *,
850
+ github_environment: typing.Optional[builtins.str] = None,
721
851
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
722
852
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
723
853
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
724
854
  git_branch: typing.Optional[builtins.str] = None,
725
855
  git_commit_message: typing.Optional[builtins.str] = None,
726
856
  github_deploy_key_secret: typing.Optional[builtins.str] = None,
727
- github_repo: typing.Optional[builtins.str] = None,
728
857
  github_token_secret: typing.Optional[builtins.str] = None,
729
858
  github_use_ssh: typing.Optional[builtins.bool] = None,
730
859
  git_user_email: typing.Optional[builtins.str] = None,
@@ -732,17 +861,17 @@ class GoPublishOptions(CommonPublishOptions):
732
861
  ) -> None:
733
862
  '''(experimental) Options for Go releases.
734
863
 
864
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
735
865
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
736
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
866
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
737
867
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
738
868
  :param git_branch: (experimental) Branch to push to. Default: "main"
739
869
  :param git_commit_message: (experimental) The commit message. Default: "chore(release): $VERSION"
740
870
  :param github_deploy_key_secret: (experimental) The name of the secret that includes a GitHub deploy key used to push to the GitHub repository. Ignored if ``githubUseSsh`` is ``false``. Default: "GO_GITHUB_DEPLOY_KEY"
741
- :param github_repo: (experimental) GitHub repository to push to. Default: - derived from ``moduleName``
742
871
  :param github_token_secret: (experimental) The name of the secret that includes a personal GitHub access token used to push to the GitHub repository. Ignored if ``githubUseSsh`` is ``true``. Default: "GO_GITHUB_TOKEN"
743
872
  :param github_use_ssh: (experimental) Use SSH to push to GitHub instead of a personal accses token. Default: false
744
- :param git_user_email: (experimental) The email to use in the release git commit. Default: "github-actions@github.com"
745
- :param git_user_name: (experimental) The user name to use for the release git commit. Default: "github-actions"
873
+ :param git_user_email: (experimental) The email to use in the release git commit. Default: - default GitHub Actions user email
874
+ :param git_user_name: (experimental) The user name to use for the release git commit. Default: - default GitHub Actions user name
746
875
 
747
876
  :stability: experimental
748
877
  '''
@@ -750,18 +879,20 @@ class GoPublishOptions(CommonPublishOptions):
750
879
  publish_tools = _Tools_75b93a2a(**publish_tools)
751
880
  if __debug__:
752
881
  type_hints = typing.get_type_hints(_typecheckingstub__81a5b8a4f17bcea99089b42477d5b778fd3a9066d3d1126736ccf21a9c44bfbc)
882
+ check_type(argname="argument github_environment", value=github_environment, expected_type=type_hints["github_environment"])
753
883
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
754
884
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
755
885
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
756
886
  check_type(argname="argument git_branch", value=git_branch, expected_type=type_hints["git_branch"])
757
887
  check_type(argname="argument git_commit_message", value=git_commit_message, expected_type=type_hints["git_commit_message"])
758
888
  check_type(argname="argument github_deploy_key_secret", value=github_deploy_key_secret, expected_type=type_hints["github_deploy_key_secret"])
759
- check_type(argname="argument github_repo", value=github_repo, expected_type=type_hints["github_repo"])
760
889
  check_type(argname="argument github_token_secret", value=github_token_secret, expected_type=type_hints["github_token_secret"])
761
890
  check_type(argname="argument github_use_ssh", value=github_use_ssh, expected_type=type_hints["github_use_ssh"])
762
891
  check_type(argname="argument git_user_email", value=git_user_email, expected_type=type_hints["git_user_email"])
763
892
  check_type(argname="argument git_user_name", value=git_user_name, expected_type=type_hints["git_user_name"])
764
893
  self._values: typing.Dict[builtins.str, typing.Any] = {}
894
+ if github_environment is not None:
895
+ self._values["github_environment"] = github_environment
765
896
  if post_publish_steps is not None:
766
897
  self._values["post_publish_steps"] = post_publish_steps
767
898
  if pre_publish_steps is not None:
@@ -774,8 +905,6 @@ class GoPublishOptions(CommonPublishOptions):
774
905
  self._values["git_commit_message"] = git_commit_message
775
906
  if github_deploy_key_secret is not None:
776
907
  self._values["github_deploy_key_secret"] = github_deploy_key_secret
777
- if github_repo is not None:
778
- self._values["github_repo"] = github_repo
779
908
  if github_token_secret is not None:
780
909
  self._values["github_token_secret"] = github_token_secret
781
910
  if github_use_ssh is not None:
@@ -785,6 +914,22 @@ class GoPublishOptions(CommonPublishOptions):
785
914
  if git_user_name is not None:
786
915
  self._values["git_user_name"] = git_user_name
787
916
 
917
+ @builtins.property
918
+ def github_environment(self) -> typing.Optional[builtins.str]:
919
+ '''(experimental) The GitHub Actions environment used for publishing.
920
+
921
+ This can be used to add an explicit approval step to the release
922
+ or limit who can initiate a release through environment protection rules.
923
+
924
+ Set this to overwrite a package level publishing environment just for this artifact.
925
+
926
+ :default: - no environment used, unless set at the package level
927
+
928
+ :stability: experimental
929
+ '''
930
+ result = self._values.get("github_environment")
931
+ return typing.cast(typing.Optional[builtins.str], result)
932
+
788
933
  @builtins.property
789
934
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
790
935
  '''(experimental) Steps to execute after executing the publishing command.
@@ -801,7 +946,7 @@ class GoPublishOptions(CommonPublishOptions):
801
946
 
802
947
  @builtins.property
803
948
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
804
- '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede.
949
+ '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed.
805
950
 
806
951
  These steps are executed after ``dist/`` has been populated with the build
807
952
  output.
@@ -859,17 +1004,6 @@ class GoPublishOptions(CommonPublishOptions):
859
1004
  result = self._values.get("github_deploy_key_secret")
860
1005
  return typing.cast(typing.Optional[builtins.str], result)
861
1006
 
862
- @builtins.property
863
- def github_repo(self) -> typing.Optional[builtins.str]:
864
- '''(experimental) GitHub repository to push to.
865
-
866
- :default: - derived from ``moduleName``
867
-
868
- :stability: experimental
869
- '''
870
- result = self._values.get("github_repo")
871
- return typing.cast(typing.Optional[builtins.str], result)
872
-
873
1007
  @builtins.property
874
1008
  def github_token_secret(self) -> typing.Optional[builtins.str]:
875
1009
  '''(experimental) The name of the secret that includes a personal GitHub access token used to push to the GitHub repository.
@@ -898,7 +1032,7 @@ class GoPublishOptions(CommonPublishOptions):
898
1032
  def git_user_email(self) -> typing.Optional[builtins.str]:
899
1033
  '''(experimental) The email to use in the release git commit.
900
1034
 
901
- :default: "github-actions@github.com"
1035
+ :default: - default GitHub Actions user email
902
1036
 
903
1037
  :stability: experimental
904
1038
  '''
@@ -909,7 +1043,7 @@ class GoPublishOptions(CommonPublishOptions):
909
1043
  def git_user_name(self) -> typing.Optional[builtins.str]:
910
1044
  '''(experimental) The user name to use for the release git commit.
911
1045
 
912
- :default: "github-actions"
1046
+ :default: - default GitHub Actions user name
913
1047
 
914
1048
  :stability: experimental
915
1049
  '''
@@ -932,13 +1066,13 @@ class GoPublishOptions(CommonPublishOptions):
932
1066
  jsii_type="projen.release.JsiiReleaseGo",
933
1067
  jsii_struct_bases=[GoPublishOptions],
934
1068
  name_mapping={
1069
+ "github_environment": "githubEnvironment",
935
1070
  "post_publish_steps": "postPublishSteps",
936
1071
  "pre_publish_steps": "prePublishSteps",
937
1072
  "publish_tools": "publishTools",
938
1073
  "git_branch": "gitBranch",
939
1074
  "git_commit_message": "gitCommitMessage",
940
1075
  "github_deploy_key_secret": "githubDeployKeySecret",
941
- "github_repo": "githubRepo",
942
1076
  "github_token_secret": "githubTokenSecret",
943
1077
  "github_use_ssh": "githubUseSsh",
944
1078
  "git_user_email": "gitUserEmail",
@@ -949,30 +1083,30 @@ class JsiiReleaseGo(GoPublishOptions):
949
1083
  def __init__(
950
1084
  self,
951
1085
  *,
1086
+ github_environment: typing.Optional[builtins.str] = None,
952
1087
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
953
1088
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
954
1089
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
955
1090
  git_branch: typing.Optional[builtins.str] = None,
956
1091
  git_commit_message: typing.Optional[builtins.str] = None,
957
1092
  github_deploy_key_secret: typing.Optional[builtins.str] = None,
958
- github_repo: typing.Optional[builtins.str] = None,
959
1093
  github_token_secret: typing.Optional[builtins.str] = None,
960
1094
  github_use_ssh: typing.Optional[builtins.bool] = None,
961
1095
  git_user_email: typing.Optional[builtins.str] = None,
962
1096
  git_user_name: typing.Optional[builtins.str] = None,
963
1097
  ) -> None:
964
1098
  '''
1099
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
965
1100
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
966
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
1101
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
967
1102
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
968
1103
  :param git_branch: (experimental) Branch to push to. Default: "main"
969
1104
  :param git_commit_message: (experimental) The commit message. Default: "chore(release): $VERSION"
970
1105
  :param github_deploy_key_secret: (experimental) The name of the secret that includes a GitHub deploy key used to push to the GitHub repository. Ignored if ``githubUseSsh`` is ``false``. Default: "GO_GITHUB_DEPLOY_KEY"
971
- :param github_repo: (experimental) GitHub repository to push to. Default: - derived from ``moduleName``
972
1106
  :param github_token_secret: (experimental) The name of the secret that includes a personal GitHub access token used to push to the GitHub repository. Ignored if ``githubUseSsh`` is ``true``. Default: "GO_GITHUB_TOKEN"
973
1107
  :param github_use_ssh: (experimental) Use SSH to push to GitHub instead of a personal accses token. Default: false
974
- :param git_user_email: (experimental) The email to use in the release git commit. Default: "github-actions@github.com"
975
- :param git_user_name: (experimental) The user name to use for the release git commit. Default: "github-actions"
1108
+ :param git_user_email: (experimental) The email to use in the release git commit. Default: - default GitHub Actions user email
1109
+ :param git_user_name: (experimental) The user name to use for the release git commit. Default: - default GitHub Actions user name
976
1110
 
977
1111
  :deprecated: Use ``GoPublishOptions`` instead.
978
1112
 
@@ -982,18 +1116,20 @@ class JsiiReleaseGo(GoPublishOptions):
982
1116
  publish_tools = _Tools_75b93a2a(**publish_tools)
983
1117
  if __debug__:
984
1118
  type_hints = typing.get_type_hints(_typecheckingstub__44bae65cd3313afa37ada6dbaab99141ff7744458e985bc9c53faa021220e167)
1119
+ check_type(argname="argument github_environment", value=github_environment, expected_type=type_hints["github_environment"])
985
1120
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
986
1121
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
987
1122
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
988
1123
  check_type(argname="argument git_branch", value=git_branch, expected_type=type_hints["git_branch"])
989
1124
  check_type(argname="argument git_commit_message", value=git_commit_message, expected_type=type_hints["git_commit_message"])
990
1125
  check_type(argname="argument github_deploy_key_secret", value=github_deploy_key_secret, expected_type=type_hints["github_deploy_key_secret"])
991
- check_type(argname="argument github_repo", value=github_repo, expected_type=type_hints["github_repo"])
992
1126
  check_type(argname="argument github_token_secret", value=github_token_secret, expected_type=type_hints["github_token_secret"])
993
1127
  check_type(argname="argument github_use_ssh", value=github_use_ssh, expected_type=type_hints["github_use_ssh"])
994
1128
  check_type(argname="argument git_user_email", value=git_user_email, expected_type=type_hints["git_user_email"])
995
1129
  check_type(argname="argument git_user_name", value=git_user_name, expected_type=type_hints["git_user_name"])
996
1130
  self._values: typing.Dict[builtins.str, typing.Any] = {}
1131
+ if github_environment is not None:
1132
+ self._values["github_environment"] = github_environment
997
1133
  if post_publish_steps is not None:
998
1134
  self._values["post_publish_steps"] = post_publish_steps
999
1135
  if pre_publish_steps is not None:
@@ -1006,8 +1142,6 @@ class JsiiReleaseGo(GoPublishOptions):
1006
1142
  self._values["git_commit_message"] = git_commit_message
1007
1143
  if github_deploy_key_secret is not None:
1008
1144
  self._values["github_deploy_key_secret"] = github_deploy_key_secret
1009
- if github_repo is not None:
1010
- self._values["github_repo"] = github_repo
1011
1145
  if github_token_secret is not None:
1012
1146
  self._values["github_token_secret"] = github_token_secret
1013
1147
  if github_use_ssh is not None:
@@ -1017,6 +1151,22 @@ class JsiiReleaseGo(GoPublishOptions):
1017
1151
  if git_user_name is not None:
1018
1152
  self._values["git_user_name"] = git_user_name
1019
1153
 
1154
+ @builtins.property
1155
+ def github_environment(self) -> typing.Optional[builtins.str]:
1156
+ '''(experimental) The GitHub Actions environment used for publishing.
1157
+
1158
+ This can be used to add an explicit approval step to the release
1159
+ or limit who can initiate a release through environment protection rules.
1160
+
1161
+ Set this to overwrite a package level publishing environment just for this artifact.
1162
+
1163
+ :default: - no environment used, unless set at the package level
1164
+
1165
+ :stability: experimental
1166
+ '''
1167
+ result = self._values.get("github_environment")
1168
+ return typing.cast(typing.Optional[builtins.str], result)
1169
+
1020
1170
  @builtins.property
1021
1171
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
1022
1172
  '''(experimental) Steps to execute after executing the publishing command.
@@ -1033,7 +1183,7 @@ class JsiiReleaseGo(GoPublishOptions):
1033
1183
 
1034
1184
  @builtins.property
1035
1185
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
1036
- '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede.
1186
+ '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed.
1037
1187
 
1038
1188
  These steps are executed after ``dist/`` has been populated with the build
1039
1189
  output.
@@ -1091,17 +1241,6 @@ class JsiiReleaseGo(GoPublishOptions):
1091
1241
  result = self._values.get("github_deploy_key_secret")
1092
1242
  return typing.cast(typing.Optional[builtins.str], result)
1093
1243
 
1094
- @builtins.property
1095
- def github_repo(self) -> typing.Optional[builtins.str]:
1096
- '''(experimental) GitHub repository to push to.
1097
-
1098
- :default: - derived from ``moduleName``
1099
-
1100
- :stability: experimental
1101
- '''
1102
- result = self._values.get("github_repo")
1103
- return typing.cast(typing.Optional[builtins.str], result)
1104
-
1105
1244
  @builtins.property
1106
1245
  def github_token_secret(self) -> typing.Optional[builtins.str]:
1107
1246
  '''(experimental) The name of the secret that includes a personal GitHub access token used to push to the GitHub repository.
@@ -1130,7 +1269,7 @@ class JsiiReleaseGo(GoPublishOptions):
1130
1269
  def git_user_email(self) -> typing.Optional[builtins.str]:
1131
1270
  '''(experimental) The email to use in the release git commit.
1132
1271
 
1133
- :default: "github-actions@github.com"
1272
+ :default: - default GitHub Actions user email
1134
1273
 
1135
1274
  :stability: experimental
1136
1275
  '''
@@ -1141,7 +1280,7 @@ class JsiiReleaseGo(GoPublishOptions):
1141
1280
  def git_user_name(self) -> typing.Optional[builtins.str]:
1142
1281
  '''(experimental) The user name to use for the release git commit.
1143
1282
 
1144
- :default: "github-actions"
1283
+ :default: - default GitHub Actions user name
1145
1284
 
1146
1285
  :stability: experimental
1147
1286
  '''
@@ -1248,6 +1387,7 @@ class ManualReleaseOptions:
1248
1387
  jsii_type="projen.release.MavenPublishOptions",
1249
1388
  jsii_struct_bases=[CommonPublishOptions],
1250
1389
  name_mapping={
1390
+ "github_environment": "githubEnvironment",
1251
1391
  "post_publish_steps": "postPublishSteps",
1252
1392
  "pre_publish_steps": "prePublishSteps",
1253
1393
  "publish_tools": "publishTools",
@@ -1265,6 +1405,7 @@ class MavenPublishOptions(CommonPublishOptions):
1265
1405
  def __init__(
1266
1406
  self,
1267
1407
  *,
1408
+ github_environment: typing.Optional[builtins.str] = None,
1268
1409
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1269
1410
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1270
1411
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -1279,15 +1420,16 @@ class MavenPublishOptions(CommonPublishOptions):
1279
1420
  ) -> None:
1280
1421
  '''(experimental) Options for Maven releases.
1281
1422
 
1423
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
1282
1424
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
1283
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
1425
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
1284
1426
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
1285
- :param maven_endpoint: (experimental) URL of Nexus repository. if not set, defaults to https://oss.sonatype.org Default: "https://oss.sonatype.org"
1427
+ :param maven_endpoint: (experimental) URL of Nexus repository. if not set, defaults to https://oss.sonatype.org Default: - "https://oss.sonatype.org" or none when publishing to Maven Central
1286
1428
  :param maven_gpg_private_key_passphrase: (experimental) GitHub secret name which contains the GPG private key or file that includes it. This is used to sign your Maven packages. See instructions. Default: "MAVEN_GPG_PRIVATE_KEY_PASSPHRASE" or not set when using GitHub Packages
1287
1429
  :param maven_gpg_private_key_secret: (experimental) GitHub secret name which contains the GPG private key or file that includes it. This is used to sign your Maven packages. See instructions. Default: "MAVEN_GPG_PRIVATE_KEY" or not set when using GitHub Packages
1288
1430
  :param maven_password: (experimental) GitHub secret name which contains the Password for maven repository. For Maven Central, you will need to Create JIRA account and then request a new project (see links). Default: "MAVEN_PASSWORD" or "GITHUB_TOKEN" when using GitHub Packages
1289
1431
  :param maven_repository_url: (experimental) Deployment repository when not deploying to Maven Central. Default: - not set
1290
- :param maven_server_id: (experimental) Used in maven settings for credential lookup (e.g. use github when publishing to GitHub). Default: "ossrh" (Maven Central) or "github" when using GitHub Packages
1432
+ :param maven_server_id: (experimental) Used in maven settings for credential lookup (e.g. use github when publishing to GitHub). Set to ``central-ossrh`` to publish to Maven Central. Default: "central-ossrh" (Maven Central) or "github" when using GitHub Packages
1291
1433
  :param maven_staging_profile_id: (experimental) GitHub secret name which contains the Maven Central (sonatype) staging profile ID (e.g. 68a05363083174). Staging profile ID can be found in the URL of the "Releases" staging profile under "Staging Profiles" in https://oss.sonatype.org (e.g. https://oss.sonatype.org/#stagingProfiles;11a33451234521). Default: "MAVEN_STAGING_PROFILE_ID" or not set when using GitHub Packages
1292
1434
  :param maven_username: (experimental) GitHub secret name which contains the Username for maven repository. For Maven Central, you will need to Create JIRA account and then request a new project (see links). Default: "MAVEN_USERNAME" or the GitHub Actor when using GitHub Packages
1293
1435
 
@@ -1297,6 +1439,7 @@ class MavenPublishOptions(CommonPublishOptions):
1297
1439
  publish_tools = _Tools_75b93a2a(**publish_tools)
1298
1440
  if __debug__:
1299
1441
  type_hints = typing.get_type_hints(_typecheckingstub__da2d55bfa47dd9e6869b7f55b573dea54539ab2e9b833766e4140d6d4c4c3d7e)
1442
+ check_type(argname="argument github_environment", value=github_environment, expected_type=type_hints["github_environment"])
1300
1443
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
1301
1444
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
1302
1445
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
@@ -1309,6 +1452,8 @@ class MavenPublishOptions(CommonPublishOptions):
1309
1452
  check_type(argname="argument maven_staging_profile_id", value=maven_staging_profile_id, expected_type=type_hints["maven_staging_profile_id"])
1310
1453
  check_type(argname="argument maven_username", value=maven_username, expected_type=type_hints["maven_username"])
1311
1454
  self._values: typing.Dict[builtins.str, typing.Any] = {}
1455
+ if github_environment is not None:
1456
+ self._values["github_environment"] = github_environment
1312
1457
  if post_publish_steps is not None:
1313
1458
  self._values["post_publish_steps"] = post_publish_steps
1314
1459
  if pre_publish_steps is not None:
@@ -1332,6 +1477,22 @@ class MavenPublishOptions(CommonPublishOptions):
1332
1477
  if maven_username is not None:
1333
1478
  self._values["maven_username"] = maven_username
1334
1479
 
1480
+ @builtins.property
1481
+ def github_environment(self) -> typing.Optional[builtins.str]:
1482
+ '''(experimental) The GitHub Actions environment used for publishing.
1483
+
1484
+ This can be used to add an explicit approval step to the release
1485
+ or limit who can initiate a release through environment protection rules.
1486
+
1487
+ Set this to overwrite a package level publishing environment just for this artifact.
1488
+
1489
+ :default: - no environment used, unless set at the package level
1490
+
1491
+ :stability: experimental
1492
+ '''
1493
+ result = self._values.get("github_environment")
1494
+ return typing.cast(typing.Optional[builtins.str], result)
1495
+
1335
1496
  @builtins.property
1336
1497
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
1337
1498
  '''(experimental) Steps to execute after executing the publishing command.
@@ -1348,7 +1509,7 @@ class MavenPublishOptions(CommonPublishOptions):
1348
1509
 
1349
1510
  @builtins.property
1350
1511
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
1351
- '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede.
1512
+ '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed.
1352
1513
 
1353
1514
  These steps are executed after ``dist/`` has been populated with the build
1354
1515
  output.
@@ -1377,7 +1538,7 @@ class MavenPublishOptions(CommonPublishOptions):
1377
1538
 
1378
1539
  if not set, defaults to https://oss.sonatype.org
1379
1540
 
1380
- :default: "https://oss.sonatype.org"
1541
+ :default: - "https://oss.sonatype.org" or none when publishing to Maven Central
1381
1542
 
1382
1543
  :stability: experimental
1383
1544
  '''
@@ -1443,7 +1604,9 @@ class MavenPublishOptions(CommonPublishOptions):
1443
1604
  def maven_server_id(self) -> typing.Optional[builtins.str]:
1444
1605
  '''(experimental) Used in maven settings for credential lookup (e.g. use github when publishing to GitHub).
1445
1606
 
1446
- :default: "ossrh" (Maven Central) or "github" when using GitHub Packages
1607
+ Set to ``central-ossrh`` to publish to Maven Central.
1608
+
1609
+ :default: "central-ossrh" (Maven Central) or "github" when using GitHub Packages
1447
1610
 
1448
1611
  :stability: experimental
1449
1612
  '''
@@ -1492,36 +1655,45 @@ class MavenPublishOptions(CommonPublishOptions):
1492
1655
  jsii_type="projen.release.NpmPublishOptions",
1493
1656
  jsii_struct_bases=[CommonPublishOptions],
1494
1657
  name_mapping={
1658
+ "github_environment": "githubEnvironment",
1495
1659
  "post_publish_steps": "postPublishSteps",
1496
1660
  "pre_publish_steps": "prePublishSteps",
1497
1661
  "publish_tools": "publishTools",
1498
1662
  "code_artifact_options": "codeArtifactOptions",
1499
1663
  "dist_tag": "distTag",
1664
+ "npm_provenance": "npmProvenance",
1500
1665
  "npm_token_secret": "npmTokenSecret",
1501
1666
  "registry": "registry",
1667
+ "trusted_publishing": "trustedPublishing",
1502
1668
  },
1503
1669
  )
1504
1670
  class NpmPublishOptions(CommonPublishOptions):
1505
1671
  def __init__(
1506
1672
  self,
1507
1673
  *,
1674
+ github_environment: typing.Optional[builtins.str] = None,
1508
1675
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1509
1676
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1510
1677
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
1511
1678
  code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
1512
1679
  dist_tag: typing.Optional[builtins.str] = None,
1680
+ npm_provenance: typing.Optional[builtins.bool] = None,
1513
1681
  npm_token_secret: typing.Optional[builtins.str] = None,
1514
1682
  registry: typing.Optional[builtins.str] = None,
1683
+ trusted_publishing: typing.Optional[builtins.bool] = None,
1515
1684
  ) -> None:
1516
1685
  '''(experimental) Options for npm release.
1517
1686
 
1687
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
1518
1688
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
1519
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
1689
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
1520
1690
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
1521
- :param code_artifact_options: (experimental) Options for publishing npm package to AWS CodeArtifact. Default: - undefined
1691
+ :param code_artifact_options: (experimental) Options for publishing npm package to AWS CodeArtifact. Default: - package is not published to
1522
1692
  :param dist_tag: (deprecated) Tags can be used to provide an alias instead of version numbers. For example, a project might choose to have multiple streams of development and use a different tag for each stream, e.g., stable, beta, dev, canary. By default, the ``latest`` tag is used by npm to identify the current version of a package, and ``npm install <pkg>`` (without any ``@<version>`` or ``@<tag>`` specifier) installs the latest tag. Typically, projects only use the ``latest`` tag for stable release versions, and use other tags for unstable versions such as prereleases. The ``next`` tag is used by some projects to identify the upcoming version. Default: "latest"
1523
- :param npm_token_secret: (experimental) GitHub secret which contains the NPM token to use when publishing packages. Default: - "NPM_TOKEN" or "GITHUB_TOKEN" if ``registry`` is set to ``npm.pkg.github.com``.
1693
+ :param npm_provenance: (experimental) Should provenance statements be generated when package is published. Note that this component is using ``publib`` to publish packages, which is using npm internally and supports provenance statements independently of the package manager used. Only works in supported CI/CD environments. Default: - enabled for for public packages using trusted publishing, disabled otherwise
1694
+ :param npm_token_secret: (experimental) GitHub secret which contains the NPM token to use for publishing packages. Default: - "NPM_TOKEN" or "GITHUB_TOKEN" if ``registry`` is set to ``npm.pkg.github.com``.
1524
1695
  :param registry: (experimental) The domain name of the npm package registry. To publish to GitHub Packages, set this value to ``"npm.pkg.github.com"``. In this if ``npmTokenSecret`` is not specified, it will default to ``GITHUB_TOKEN`` which means that you will be able to publish to the repository's package store. In this case, make sure ``repositoryUrl`` is correctly defined. Default: "registry.npmjs.org"
1696
+ :param trusted_publishing: (experimental) Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work. Requires npm CLI version 11.5.1 or later, this is NOT ensured automatically. When used, ``npmTokenSecret`` will be ignored. Default: - false
1525
1697
 
1526
1698
  :stability: experimental
1527
1699
  '''
@@ -1531,14 +1703,19 @@ class NpmPublishOptions(CommonPublishOptions):
1531
1703
  code_artifact_options = CodeArtifactOptions(**code_artifact_options)
1532
1704
  if __debug__:
1533
1705
  type_hints = typing.get_type_hints(_typecheckingstub__458289050585e6e895f9ee709ee4e102166b0f71e3c8b2a0617efa2d24e990fb)
1706
+ check_type(argname="argument github_environment", value=github_environment, expected_type=type_hints["github_environment"])
1534
1707
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
1535
1708
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
1536
1709
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
1537
1710
  check_type(argname="argument code_artifact_options", value=code_artifact_options, expected_type=type_hints["code_artifact_options"])
1538
1711
  check_type(argname="argument dist_tag", value=dist_tag, expected_type=type_hints["dist_tag"])
1712
+ check_type(argname="argument npm_provenance", value=npm_provenance, expected_type=type_hints["npm_provenance"])
1539
1713
  check_type(argname="argument npm_token_secret", value=npm_token_secret, expected_type=type_hints["npm_token_secret"])
1540
1714
  check_type(argname="argument registry", value=registry, expected_type=type_hints["registry"])
1715
+ check_type(argname="argument trusted_publishing", value=trusted_publishing, expected_type=type_hints["trusted_publishing"])
1541
1716
  self._values: typing.Dict[builtins.str, typing.Any] = {}
1717
+ if github_environment is not None:
1718
+ self._values["github_environment"] = github_environment
1542
1719
  if post_publish_steps is not None:
1543
1720
  self._values["post_publish_steps"] = post_publish_steps
1544
1721
  if pre_publish_steps is not None:
@@ -1549,10 +1726,30 @@ class NpmPublishOptions(CommonPublishOptions):
1549
1726
  self._values["code_artifact_options"] = code_artifact_options
1550
1727
  if dist_tag is not None:
1551
1728
  self._values["dist_tag"] = dist_tag
1729
+ if npm_provenance is not None:
1730
+ self._values["npm_provenance"] = npm_provenance
1552
1731
  if npm_token_secret is not None:
1553
1732
  self._values["npm_token_secret"] = npm_token_secret
1554
1733
  if registry is not None:
1555
1734
  self._values["registry"] = registry
1735
+ if trusted_publishing is not None:
1736
+ self._values["trusted_publishing"] = trusted_publishing
1737
+
1738
+ @builtins.property
1739
+ def github_environment(self) -> typing.Optional[builtins.str]:
1740
+ '''(experimental) The GitHub Actions environment used for publishing.
1741
+
1742
+ This can be used to add an explicit approval step to the release
1743
+ or limit who can initiate a release through environment protection rules.
1744
+
1745
+ Set this to overwrite a package level publishing environment just for this artifact.
1746
+
1747
+ :default: - no environment used, unless set at the package level
1748
+
1749
+ :stability: experimental
1750
+ '''
1751
+ result = self._values.get("github_environment")
1752
+ return typing.cast(typing.Optional[builtins.str], result)
1556
1753
 
1557
1754
  @builtins.property
1558
1755
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
@@ -1570,7 +1767,7 @@ class NpmPublishOptions(CommonPublishOptions):
1570
1767
 
1571
1768
  @builtins.property
1572
1769
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
1573
- '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede.
1770
+ '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed.
1574
1771
 
1575
1772
  These steps are executed after ``dist/`` has been populated with the build
1576
1773
  output.
@@ -1597,7 +1794,7 @@ class NpmPublishOptions(CommonPublishOptions):
1597
1794
  def code_artifact_options(self) -> typing.Optional[CodeArtifactOptions]:
1598
1795
  '''(experimental) Options for publishing npm package to AWS CodeArtifact.
1599
1796
 
1600
- :default: - undefined
1797
+ :default: - package is not published to
1601
1798
 
1602
1799
  :stability: experimental
1603
1800
  '''
@@ -1628,9 +1825,26 @@ class NpmPublishOptions(CommonPublishOptions):
1628
1825
  result = self._values.get("dist_tag")
1629
1826
  return typing.cast(typing.Optional[builtins.str], result)
1630
1827
 
1828
+ @builtins.property
1829
+ def npm_provenance(self) -> typing.Optional[builtins.bool]:
1830
+ '''(experimental) Should provenance statements be generated when package is published.
1831
+
1832
+ Note that this component is using ``publib`` to publish packages,
1833
+ which is using npm internally and supports provenance statements independently of the package manager used.
1834
+
1835
+ Only works in supported CI/CD environments.
1836
+
1837
+ :default: - enabled for for public packages using trusted publishing, disabled otherwise
1838
+
1839
+ :see: https://docs.npmjs.com/generating-provenance-statements
1840
+ :stability: experimental
1841
+ '''
1842
+ result = self._values.get("npm_provenance")
1843
+ return typing.cast(typing.Optional[builtins.bool], result)
1844
+
1631
1845
  @builtins.property
1632
1846
  def npm_token_secret(self) -> typing.Optional[builtins.str]:
1633
- '''(experimental) GitHub secret which contains the NPM token to use when publishing packages.
1847
+ '''(experimental) GitHub secret which contains the NPM token to use for publishing packages.
1634
1848
 
1635
1849
  :default: - "NPM_TOKEN" or "GITHUB_TOKEN" if ``registry`` is set to ``npm.pkg.github.com``.
1636
1850
 
@@ -1660,6 +1874,21 @@ class NpmPublishOptions(CommonPublishOptions):
1660
1874
  result = self._values.get("registry")
1661
1875
  return typing.cast(typing.Optional[builtins.str], result)
1662
1876
 
1877
+ @builtins.property
1878
+ def trusted_publishing(self) -> typing.Optional[builtins.bool]:
1879
+ '''(experimental) Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work.
1880
+
1881
+ Requires npm CLI version 11.5.1 or later, this is NOT ensured automatically.
1882
+ When used, ``npmTokenSecret`` will be ignored.
1883
+
1884
+ :default: - false
1885
+
1886
+ :see: https://docs.npmjs.com/trusted-publishers
1887
+ :stability: experimental
1888
+ '''
1889
+ result = self._values.get("trusted_publishing")
1890
+ return typing.cast(typing.Optional[builtins.bool], result)
1891
+
1663
1892
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
1664
1893
  return isinstance(rhs, self.__class__) and rhs._values == self._values
1665
1894
 
@@ -1676,30 +1905,39 @@ class NpmPublishOptions(CommonPublishOptions):
1676
1905
  jsii_type="projen.release.NugetPublishOptions",
1677
1906
  jsii_struct_bases=[CommonPublishOptions],
1678
1907
  name_mapping={
1908
+ "github_environment": "githubEnvironment",
1679
1909
  "post_publish_steps": "postPublishSteps",
1680
1910
  "pre_publish_steps": "prePublishSteps",
1681
1911
  "publish_tools": "publishTools",
1682
1912
  "nuget_api_key_secret": "nugetApiKeySecret",
1683
1913
  "nuget_server": "nugetServer",
1914
+ "nuget_username_secret": "nugetUsernameSecret",
1915
+ "trusted_publishing": "trustedPublishing",
1684
1916
  },
1685
1917
  )
1686
1918
  class NugetPublishOptions(CommonPublishOptions):
1687
1919
  def __init__(
1688
1920
  self,
1689
1921
  *,
1922
+ github_environment: typing.Optional[builtins.str] = None,
1690
1923
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1691
1924
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1692
1925
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
1693
1926
  nuget_api_key_secret: typing.Optional[builtins.str] = None,
1694
1927
  nuget_server: typing.Optional[builtins.str] = None,
1928
+ nuget_username_secret: typing.Optional[builtins.str] = None,
1929
+ trusted_publishing: typing.Optional[builtins.bool] = None,
1695
1930
  ) -> None:
1696
1931
  '''(experimental) Options for NuGet releases.
1697
1932
 
1933
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
1698
1934
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
1699
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
1935
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
1700
1936
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
1701
1937
  :param nuget_api_key_secret: (experimental) GitHub secret which contains the API key for NuGet. Default: "NUGET_API_KEY"
1702
1938
  :param nuget_server: (experimental) NuGet Server URL (defaults to nuget.org).
1939
+ :param nuget_username_secret: (experimental) The NuGet.org username (profile name, not email address) for trusted publisher authentication. Required when using trusted publishing. Default: "NUGET_USERNAME"
1940
+ :param trusted_publishing: (experimental) Use NuGet trusted publishing instead of API keys. Needs to be setup in NuGet.org.
1703
1941
 
1704
1942
  :stability: experimental
1705
1943
  '''
@@ -1707,12 +1945,17 @@ class NugetPublishOptions(CommonPublishOptions):
1707
1945
  publish_tools = _Tools_75b93a2a(**publish_tools)
1708
1946
  if __debug__:
1709
1947
  type_hints = typing.get_type_hints(_typecheckingstub__584d4125e43e970396e9062b357de30ef32a6d1b30bd3a0f00fc7db041ea0bec)
1948
+ check_type(argname="argument github_environment", value=github_environment, expected_type=type_hints["github_environment"])
1710
1949
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
1711
1950
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
1712
1951
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
1713
1952
  check_type(argname="argument nuget_api_key_secret", value=nuget_api_key_secret, expected_type=type_hints["nuget_api_key_secret"])
1714
1953
  check_type(argname="argument nuget_server", value=nuget_server, expected_type=type_hints["nuget_server"])
1954
+ check_type(argname="argument nuget_username_secret", value=nuget_username_secret, expected_type=type_hints["nuget_username_secret"])
1955
+ check_type(argname="argument trusted_publishing", value=trusted_publishing, expected_type=type_hints["trusted_publishing"])
1715
1956
  self._values: typing.Dict[builtins.str, typing.Any] = {}
1957
+ if github_environment is not None:
1958
+ self._values["github_environment"] = github_environment
1716
1959
  if post_publish_steps is not None:
1717
1960
  self._values["post_publish_steps"] = post_publish_steps
1718
1961
  if pre_publish_steps is not None:
@@ -1723,6 +1966,26 @@ class NugetPublishOptions(CommonPublishOptions):
1723
1966
  self._values["nuget_api_key_secret"] = nuget_api_key_secret
1724
1967
  if nuget_server is not None:
1725
1968
  self._values["nuget_server"] = nuget_server
1969
+ if nuget_username_secret is not None:
1970
+ self._values["nuget_username_secret"] = nuget_username_secret
1971
+ if trusted_publishing is not None:
1972
+ self._values["trusted_publishing"] = trusted_publishing
1973
+
1974
+ @builtins.property
1975
+ def github_environment(self) -> typing.Optional[builtins.str]:
1976
+ '''(experimental) The GitHub Actions environment used for publishing.
1977
+
1978
+ This can be used to add an explicit approval step to the release
1979
+ or limit who can initiate a release through environment protection rules.
1980
+
1981
+ Set this to overwrite a package level publishing environment just for this artifact.
1982
+
1983
+ :default: - no environment used, unless set at the package level
1984
+
1985
+ :stability: experimental
1986
+ '''
1987
+ result = self._values.get("github_environment")
1988
+ return typing.cast(typing.Optional[builtins.str], result)
1726
1989
 
1727
1990
  @builtins.property
1728
1991
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
@@ -1740,7 +2003,7 @@ class NugetPublishOptions(CommonPublishOptions):
1740
2003
 
1741
2004
  @builtins.property
1742
2005
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
1743
- '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede.
2006
+ '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed.
1744
2007
 
1745
2008
  These steps are executed after ``dist/`` has been populated with the build
1746
2009
  output.
@@ -1783,6 +2046,31 @@ class NugetPublishOptions(CommonPublishOptions):
1783
2046
  result = self._values.get("nuget_server")
1784
2047
  return typing.cast(typing.Optional[builtins.str], result)
1785
2048
 
2049
+ @builtins.property
2050
+ def nuget_username_secret(self) -> typing.Optional[builtins.str]:
2051
+ '''(experimental) The NuGet.org username (profile name, not email address) for trusted publisher authentication.
2052
+
2053
+ Required when using trusted publishing.
2054
+
2055
+ :default: "NUGET_USERNAME"
2056
+
2057
+ :stability: experimental
2058
+ '''
2059
+ result = self._values.get("nuget_username_secret")
2060
+ return typing.cast(typing.Optional[builtins.str], result)
2061
+
2062
+ @builtins.property
2063
+ def trusted_publishing(self) -> typing.Optional[builtins.bool]:
2064
+ '''(experimental) Use NuGet trusted publishing instead of API keys.
2065
+
2066
+ Needs to be setup in NuGet.org.
2067
+
2068
+ :see: https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing
2069
+ :stability: experimental
2070
+ '''
2071
+ result = self._values.get("trusted_publishing")
2072
+ return typing.cast(typing.Optional[builtins.bool], result)
2073
+
1786
2074
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
1787
2075
  return isinstance(rhs, self.__class__) and rhs._values == self._values
1788
2076
 
@@ -1837,7 +2125,7 @@ class Publisher(
1837
2125
  :param publib_version: (experimental) Version requirement for ``publib``. Default: "latest"
1838
2126
  :param publish_tasks: (experimental) Define publishing tasks that can be executed manually as well as workflows. Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity. Default: false
1839
2127
  :param workflow_container_image: (experimental) Container image to use for GitHub workflows. Default: - default image
1840
- :param workflow_node_version: (experimental) Node version to setup in GitHub workflows if any node-based CLI utilities are needed. For example ``publib``, the CLI projen uses to publish releases, is an npm library. Default: 18.x
2128
+ :param workflow_node_version: (experimental) Node version to setup in GitHub workflows if any node-based CLI utilities are needed. For example ``publib``, the CLI projen uses to publish releases, is an npm library. Default: lts/*
1841
2129
  :param workflow_runs_on: (experimental) Github Runner selection labels. Default: ["ubuntu-latest"]
1842
2130
  :param workflow_runs_on_group: (experimental) Github Runner Group selection options.
1843
2131
 
@@ -1932,6 +2220,7 @@ class Publisher(
1932
2220
  changelog_file: builtins.str,
1933
2221
  release_tag_file: builtins.str,
1934
2222
  version_file: builtins.str,
2223
+ github_environment: typing.Optional[builtins.str] = None,
1935
2224
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1936
2225
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1937
2226
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -1941,8 +2230,9 @@ class Publisher(
1941
2230
  :param changelog_file: (experimental) The location of an .md file (relative to ``dist/``) that includes the changelog for the release.
1942
2231
  :param release_tag_file: (experimental) The location of a text file (relative to ``dist/``) that contains the release tag.
1943
2232
  :param version_file: (experimental) The location of a text file (relative to ``dist/``) that contains the version number.
2233
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
1944
2234
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
1945
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
2235
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
1946
2236
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
1947
2237
 
1948
2238
  :stability: experimental
@@ -1951,6 +2241,7 @@ class Publisher(
1951
2241
  changelog_file=changelog_file,
1952
2242
  release_tag_file=release_tag_file,
1953
2243
  version_file=version_file,
2244
+ github_environment=github_environment,
1954
2245
  post_publish_steps=post_publish_steps,
1955
2246
  pre_publish_steps=pre_publish_steps,
1956
2247
  publish_tools=publish_tools,
@@ -1965,11 +2256,11 @@ class Publisher(
1965
2256
  git_branch: typing.Optional[builtins.str] = None,
1966
2257
  git_commit_message: typing.Optional[builtins.str] = None,
1967
2258
  github_deploy_key_secret: typing.Optional[builtins.str] = None,
1968
- github_repo: typing.Optional[builtins.str] = None,
1969
2259
  github_token_secret: typing.Optional[builtins.str] = None,
1970
2260
  github_use_ssh: typing.Optional[builtins.bool] = None,
1971
2261
  git_user_email: typing.Optional[builtins.str] = None,
1972
2262
  git_user_name: typing.Optional[builtins.str] = None,
2263
+ github_environment: typing.Optional[builtins.str] = None,
1973
2264
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1974
2265
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1975
2266
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -1979,13 +2270,13 @@ class Publisher(
1979
2270
  :param git_branch: (experimental) Branch to push to. Default: "main"
1980
2271
  :param git_commit_message: (experimental) The commit message. Default: "chore(release): $VERSION"
1981
2272
  :param github_deploy_key_secret: (experimental) The name of the secret that includes a GitHub deploy key used to push to the GitHub repository. Ignored if ``githubUseSsh`` is ``false``. Default: "GO_GITHUB_DEPLOY_KEY"
1982
- :param github_repo: (experimental) GitHub repository to push to. Default: - derived from ``moduleName``
1983
2273
  :param github_token_secret: (experimental) The name of the secret that includes a personal GitHub access token used to push to the GitHub repository. Ignored if ``githubUseSsh`` is ``true``. Default: "GO_GITHUB_TOKEN"
1984
2274
  :param github_use_ssh: (experimental) Use SSH to push to GitHub instead of a personal accses token. Default: false
1985
- :param git_user_email: (experimental) The email to use in the release git commit. Default: "github-actions@github.com"
1986
- :param git_user_name: (experimental) The user name to use for the release git commit. Default: "github-actions"
2275
+ :param git_user_email: (experimental) The email to use in the release git commit. Default: - default GitHub Actions user email
2276
+ :param git_user_name: (experimental) The user name to use for the release git commit. Default: - default GitHub Actions user name
2277
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
1987
2278
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
1988
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
2279
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
1989
2280
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
1990
2281
 
1991
2282
  :stability: experimental
@@ -1994,11 +2285,11 @@ class Publisher(
1994
2285
  git_branch=git_branch,
1995
2286
  git_commit_message=git_commit_message,
1996
2287
  github_deploy_key_secret=github_deploy_key_secret,
1997
- github_repo=github_repo,
1998
2288
  github_token_secret=github_token_secret,
1999
2289
  github_use_ssh=github_use_ssh,
2000
2290
  git_user_email=git_user_email,
2001
2291
  git_user_name=git_user_name,
2292
+ github_environment=github_environment,
2002
2293
  post_publish_steps=post_publish_steps,
2003
2294
  pre_publish_steps=pre_publish_steps,
2004
2295
  publish_tools=publish_tools,
@@ -2018,22 +2309,24 @@ class Publisher(
2018
2309
  maven_server_id: typing.Optional[builtins.str] = None,
2019
2310
  maven_staging_profile_id: typing.Optional[builtins.str] = None,
2020
2311
  maven_username: typing.Optional[builtins.str] = None,
2312
+ github_environment: typing.Optional[builtins.str] = None,
2021
2313
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2022
2314
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2023
2315
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
2024
2316
  ) -> None:
2025
2317
  '''(experimental) Publishes artifacts from ``java/**`` to Maven.
2026
2318
 
2027
- :param maven_endpoint: (experimental) URL of Nexus repository. if not set, defaults to https://oss.sonatype.org Default: "https://oss.sonatype.org"
2319
+ :param maven_endpoint: (experimental) URL of Nexus repository. if not set, defaults to https://oss.sonatype.org Default: - "https://oss.sonatype.org" or none when publishing to Maven Central
2028
2320
  :param maven_gpg_private_key_passphrase: (experimental) GitHub secret name which contains the GPG private key or file that includes it. This is used to sign your Maven packages. See instructions. Default: "MAVEN_GPG_PRIVATE_KEY_PASSPHRASE" or not set when using GitHub Packages
2029
2321
  :param maven_gpg_private_key_secret: (experimental) GitHub secret name which contains the GPG private key or file that includes it. This is used to sign your Maven packages. See instructions. Default: "MAVEN_GPG_PRIVATE_KEY" or not set when using GitHub Packages
2030
2322
  :param maven_password: (experimental) GitHub secret name which contains the Password for maven repository. For Maven Central, you will need to Create JIRA account and then request a new project (see links). Default: "MAVEN_PASSWORD" or "GITHUB_TOKEN" when using GitHub Packages
2031
2323
  :param maven_repository_url: (experimental) Deployment repository when not deploying to Maven Central. Default: - not set
2032
- :param maven_server_id: (experimental) Used in maven settings for credential lookup (e.g. use github when publishing to GitHub). Default: "ossrh" (Maven Central) or "github" when using GitHub Packages
2324
+ :param maven_server_id: (experimental) Used in maven settings for credential lookup (e.g. use github when publishing to GitHub). Set to ``central-ossrh`` to publish to Maven Central. Default: "central-ossrh" (Maven Central) or "github" when using GitHub Packages
2033
2325
  :param maven_staging_profile_id: (experimental) GitHub secret name which contains the Maven Central (sonatype) staging profile ID (e.g. 68a05363083174). Staging profile ID can be found in the URL of the "Releases" staging profile under "Staging Profiles" in https://oss.sonatype.org (e.g. https://oss.sonatype.org/#stagingProfiles;11a33451234521). Default: "MAVEN_STAGING_PROFILE_ID" or not set when using GitHub Packages
2034
2326
  :param maven_username: (experimental) GitHub secret name which contains the Username for maven repository. For Maven Central, you will need to Create JIRA account and then request a new project (see links). Default: "MAVEN_USERNAME" or the GitHub Actor when using GitHub Packages
2327
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
2035
2328
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
2036
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
2329
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
2037
2330
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
2038
2331
 
2039
2332
  :stability: experimental
@@ -2047,6 +2340,7 @@ class Publisher(
2047
2340
  maven_server_id=maven_server_id,
2048
2341
  maven_staging_profile_id=maven_staging_profile_id,
2049
2342
  maven_username=maven_username,
2343
+ github_environment=github_environment,
2050
2344
  post_publish_steps=post_publish_steps,
2051
2345
  pre_publish_steps=pre_publish_steps,
2052
2346
  publish_tools=publish_tools,
@@ -2060,20 +2354,26 @@ class Publisher(
2060
2354
  *,
2061
2355
  code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2062
2356
  dist_tag: typing.Optional[builtins.str] = None,
2357
+ npm_provenance: typing.Optional[builtins.bool] = None,
2063
2358
  npm_token_secret: typing.Optional[builtins.str] = None,
2064
2359
  registry: typing.Optional[builtins.str] = None,
2360
+ trusted_publishing: typing.Optional[builtins.bool] = None,
2361
+ github_environment: typing.Optional[builtins.str] = None,
2065
2362
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2066
2363
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2067
2364
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
2068
2365
  ) -> None:
2069
2366
  '''(experimental) Publishes artifacts from ``js/**`` to npm.
2070
2367
 
2071
- :param code_artifact_options: (experimental) Options for publishing npm package to AWS CodeArtifact. Default: - undefined
2368
+ :param code_artifact_options: (experimental) Options for publishing npm package to AWS CodeArtifact. Default: - package is not published to
2072
2369
  :param dist_tag: (deprecated) Tags can be used to provide an alias instead of version numbers. For example, a project might choose to have multiple streams of development and use a different tag for each stream, e.g., stable, beta, dev, canary. By default, the ``latest`` tag is used by npm to identify the current version of a package, and ``npm install <pkg>`` (without any ``@<version>`` or ``@<tag>`` specifier) installs the latest tag. Typically, projects only use the ``latest`` tag for stable release versions, and use other tags for unstable versions such as prereleases. The ``next`` tag is used by some projects to identify the upcoming version. Default: "latest"
2073
- :param npm_token_secret: (experimental) GitHub secret which contains the NPM token to use when publishing packages. Default: - "NPM_TOKEN" or "GITHUB_TOKEN" if ``registry`` is set to ``npm.pkg.github.com``.
2370
+ :param npm_provenance: (experimental) Should provenance statements be generated when package is published. Note that this component is using ``publib`` to publish packages, which is using npm internally and supports provenance statements independently of the package manager used. Only works in supported CI/CD environments. Default: - enabled for for public packages using trusted publishing, disabled otherwise
2371
+ :param npm_token_secret: (experimental) GitHub secret which contains the NPM token to use for publishing packages. Default: - "NPM_TOKEN" or "GITHUB_TOKEN" if ``registry`` is set to ``npm.pkg.github.com``.
2074
2372
  :param registry: (experimental) The domain name of the npm package registry. To publish to GitHub Packages, set this value to ``"npm.pkg.github.com"``. In this if ``npmTokenSecret`` is not specified, it will default to ``GITHUB_TOKEN`` which means that you will be able to publish to the repository's package store. In this case, make sure ``repositoryUrl`` is correctly defined. Default: "registry.npmjs.org"
2373
+ :param trusted_publishing: (experimental) Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work. Requires npm CLI version 11.5.1 or later, this is NOT ensured automatically. When used, ``npmTokenSecret`` will be ignored. Default: - false
2374
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
2075
2375
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
2076
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
2376
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
2077
2377
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
2078
2378
 
2079
2379
  :stability: experimental
@@ -2081,8 +2381,11 @@ class Publisher(
2081
2381
  options = NpmPublishOptions(
2082
2382
  code_artifact_options=code_artifact_options,
2083
2383
  dist_tag=dist_tag,
2384
+ npm_provenance=npm_provenance,
2084
2385
  npm_token_secret=npm_token_secret,
2085
2386
  registry=registry,
2387
+ trusted_publishing=trusted_publishing,
2388
+ github_environment=github_environment,
2086
2389
  post_publish_steps=post_publish_steps,
2087
2390
  pre_publish_steps=pre_publish_steps,
2088
2391
  publish_tools=publish_tools,
@@ -2096,6 +2399,9 @@ class Publisher(
2096
2399
  *,
2097
2400
  nuget_api_key_secret: typing.Optional[builtins.str] = None,
2098
2401
  nuget_server: typing.Optional[builtins.str] = None,
2402
+ nuget_username_secret: typing.Optional[builtins.str] = None,
2403
+ trusted_publishing: typing.Optional[builtins.bool] = None,
2404
+ github_environment: typing.Optional[builtins.str] = None,
2099
2405
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2100
2406
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2101
2407
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -2104,8 +2410,11 @@ class Publisher(
2104
2410
 
2105
2411
  :param nuget_api_key_secret: (experimental) GitHub secret which contains the API key for NuGet. Default: "NUGET_API_KEY"
2106
2412
  :param nuget_server: (experimental) NuGet Server URL (defaults to nuget.org).
2413
+ :param nuget_username_secret: (experimental) The NuGet.org username (profile name, not email address) for trusted publisher authentication. Required when using trusted publishing. Default: "NUGET_USERNAME"
2414
+ :param trusted_publishing: (experimental) Use NuGet trusted publishing instead of API keys. Needs to be setup in NuGet.org.
2415
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
2107
2416
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
2108
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
2417
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
2109
2418
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
2110
2419
 
2111
2420
  :stability: experimental
@@ -2113,6 +2422,9 @@ class Publisher(
2113
2422
  options = NugetPublishOptions(
2114
2423
  nuget_api_key_secret=nuget_api_key_secret,
2115
2424
  nuget_server=nuget_server,
2425
+ nuget_username_secret=nuget_username_secret,
2426
+ trusted_publishing=trusted_publishing,
2427
+ github_environment=github_environment,
2116
2428
  post_publish_steps=post_publish_steps,
2117
2429
  pre_publish_steps=pre_publish_steps,
2118
2430
  publish_tools=publish_tools,
@@ -2124,28 +2436,40 @@ class Publisher(
2124
2436
  def publish_to_py_pi(
2125
2437
  self,
2126
2438
  *,
2439
+ attestations: typing.Optional[builtins.bool] = None,
2440
+ code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2441
+ trusted_publishing: typing.Optional[builtins.bool] = None,
2127
2442
  twine_password_secret: typing.Optional[builtins.str] = None,
2128
2443
  twine_registry_url: typing.Optional[builtins.str] = None,
2129
2444
  twine_username_secret: typing.Optional[builtins.str] = None,
2445
+ github_environment: typing.Optional[builtins.str] = None,
2130
2446
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2131
2447
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2132
2448
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
2133
2449
  ) -> None:
2134
2450
  '''(experimental) Publishes wheel artifacts from ``python`` to PyPI.
2135
2451
 
2452
+ :param attestations: (experimental) Generate and publish cryptographic attestations for files uploaded to PyPI. Attestations provide package provenance and integrity an can be viewed on PyPI. They are only available when using a Trusted Publisher for publishing. Default: - enabled when using trusted publishing, otherwise not applicable
2453
+ :param code_artifact_options: (experimental) Options for publishing to AWS CodeArtifact. Default: - undefined
2454
+ :param trusted_publishing: (experimental) Use PyPI trusted publishing instead of tokens or username & password. Needs to be setup in PyPI.
2136
2455
  :param twine_password_secret: (experimental) The GitHub secret which contains PyPI password. Default: "TWINE_PASSWORD"
2137
2456
  :param twine_registry_url: (experimental) The registry url to use when releasing packages. Default: - twine default
2138
2457
  :param twine_username_secret: (experimental) The GitHub secret which contains PyPI user name. Default: "TWINE_USERNAME"
2458
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
2139
2459
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
2140
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
2460
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
2141
2461
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
2142
2462
 
2143
2463
  :stability: experimental
2144
2464
  '''
2145
2465
  options = PyPiPublishOptions(
2466
+ attestations=attestations,
2467
+ code_artifact_options=code_artifact_options,
2468
+ trusted_publishing=trusted_publishing,
2146
2469
  twine_password_secret=twine_password_secret,
2147
2470
  twine_registry_url=twine_registry_url,
2148
2471
  twine_username_secret=twine_username_secret,
2472
+ github_environment=github_environment,
2149
2473
  post_publish_steps=post_publish_steps,
2150
2474
  pre_publish_steps=pre_publish_steps,
2151
2475
  publish_tools=publish_tools,
@@ -2253,7 +2577,7 @@ class PublisherOptions:
2253
2577
  :param publib_version: (experimental) Version requirement for ``publib``. Default: "latest"
2254
2578
  :param publish_tasks: (experimental) Define publishing tasks that can be executed manually as well as workflows. Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity. Default: false
2255
2579
  :param workflow_container_image: (experimental) Container image to use for GitHub workflows. Default: - default image
2256
- :param workflow_node_version: (experimental) Node version to setup in GitHub workflows if any node-based CLI utilities are needed. For example ``publib``, the CLI projen uses to publish releases, is an npm library. Default: 18.x
2580
+ :param workflow_node_version: (experimental) Node version to setup in GitHub workflows if any node-based CLI utilities are needed. For example ``publib``, the CLI projen uses to publish releases, is an npm library. Default: lts/*
2257
2581
  :param workflow_runs_on: (experimental) Github Runner selection labels. Default: ["ubuntu-latest"]
2258
2582
  :param workflow_runs_on_group: (experimental) Github Runner Group selection options.
2259
2583
 
@@ -2429,7 +2753,7 @@ class PublisherOptions:
2429
2753
  For example ``publib``, the CLI projen uses to publish releases,
2430
2754
  is an npm library.
2431
2755
 
2432
- :default: 18.x
2756
+ :default: lts/*
2433
2757
 
2434
2758
  :stability: experimental
2435
2759
  '''
@@ -2476,9 +2800,13 @@ class PublisherOptions:
2476
2800
  jsii_type="projen.release.PyPiPublishOptions",
2477
2801
  jsii_struct_bases=[CommonPublishOptions],
2478
2802
  name_mapping={
2803
+ "github_environment": "githubEnvironment",
2479
2804
  "post_publish_steps": "postPublishSteps",
2480
2805
  "pre_publish_steps": "prePublishSteps",
2481
2806
  "publish_tools": "publishTools",
2807
+ "attestations": "attestations",
2808
+ "code_artifact_options": "codeArtifactOptions",
2809
+ "trusted_publishing": "trustedPublishing",
2482
2810
  "twine_password_secret": "twinePasswordSecret",
2483
2811
  "twine_registry_url": "twineRegistryUrl",
2484
2812
  "twine_username_secret": "twineUsernameSecret",
@@ -2488,18 +2816,26 @@ class PyPiPublishOptions(CommonPublishOptions):
2488
2816
  def __init__(
2489
2817
  self,
2490
2818
  *,
2819
+ github_environment: typing.Optional[builtins.str] = None,
2491
2820
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2492
2821
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2493
2822
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
2823
+ attestations: typing.Optional[builtins.bool] = None,
2824
+ code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2825
+ trusted_publishing: typing.Optional[builtins.bool] = None,
2494
2826
  twine_password_secret: typing.Optional[builtins.str] = None,
2495
2827
  twine_registry_url: typing.Optional[builtins.str] = None,
2496
2828
  twine_username_secret: typing.Optional[builtins.str] = None,
2497
2829
  ) -> None:
2498
2830
  '''(experimental) Options for PyPI release.
2499
2831
 
2832
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
2500
2833
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
2501
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
2834
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
2502
2835
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
2836
+ :param attestations: (experimental) Generate and publish cryptographic attestations for files uploaded to PyPI. Attestations provide package provenance and integrity an can be viewed on PyPI. They are only available when using a Trusted Publisher for publishing. Default: - enabled when using trusted publishing, otherwise not applicable
2837
+ :param code_artifact_options: (experimental) Options for publishing to AWS CodeArtifact. Default: - undefined
2838
+ :param trusted_publishing: (experimental) Use PyPI trusted publishing instead of tokens or username & password. Needs to be setup in PyPI.
2503
2839
  :param twine_password_secret: (experimental) The GitHub secret which contains PyPI password. Default: "TWINE_PASSWORD"
2504
2840
  :param twine_registry_url: (experimental) The registry url to use when releasing packages. Default: - twine default
2505
2841
  :param twine_username_secret: (experimental) The GitHub secret which contains PyPI user name. Default: "TWINE_USERNAME"
@@ -2508,21 +2844,35 @@ class PyPiPublishOptions(CommonPublishOptions):
2508
2844
  '''
2509
2845
  if isinstance(publish_tools, dict):
2510
2846
  publish_tools = _Tools_75b93a2a(**publish_tools)
2847
+ if isinstance(code_artifact_options, dict):
2848
+ code_artifact_options = CodeArtifactOptions(**code_artifact_options)
2511
2849
  if __debug__:
2512
2850
  type_hints = typing.get_type_hints(_typecheckingstub__f90cd44def59be822b686bcd759d7f0a910b9936ca8acc0ef3e69cda5ddc21d2)
2851
+ check_type(argname="argument github_environment", value=github_environment, expected_type=type_hints["github_environment"])
2513
2852
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
2514
2853
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
2515
2854
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
2855
+ check_type(argname="argument attestations", value=attestations, expected_type=type_hints["attestations"])
2856
+ check_type(argname="argument code_artifact_options", value=code_artifact_options, expected_type=type_hints["code_artifact_options"])
2857
+ check_type(argname="argument trusted_publishing", value=trusted_publishing, expected_type=type_hints["trusted_publishing"])
2516
2858
  check_type(argname="argument twine_password_secret", value=twine_password_secret, expected_type=type_hints["twine_password_secret"])
2517
2859
  check_type(argname="argument twine_registry_url", value=twine_registry_url, expected_type=type_hints["twine_registry_url"])
2518
2860
  check_type(argname="argument twine_username_secret", value=twine_username_secret, expected_type=type_hints["twine_username_secret"])
2519
2861
  self._values: typing.Dict[builtins.str, typing.Any] = {}
2862
+ if github_environment is not None:
2863
+ self._values["github_environment"] = github_environment
2520
2864
  if post_publish_steps is not None:
2521
2865
  self._values["post_publish_steps"] = post_publish_steps
2522
2866
  if pre_publish_steps is not None:
2523
2867
  self._values["pre_publish_steps"] = pre_publish_steps
2524
2868
  if publish_tools is not None:
2525
2869
  self._values["publish_tools"] = publish_tools
2870
+ if attestations is not None:
2871
+ self._values["attestations"] = attestations
2872
+ if code_artifact_options is not None:
2873
+ self._values["code_artifact_options"] = code_artifact_options
2874
+ if trusted_publishing is not None:
2875
+ self._values["trusted_publishing"] = trusted_publishing
2526
2876
  if twine_password_secret is not None:
2527
2877
  self._values["twine_password_secret"] = twine_password_secret
2528
2878
  if twine_registry_url is not None:
@@ -2530,6 +2880,22 @@ class PyPiPublishOptions(CommonPublishOptions):
2530
2880
  if twine_username_secret is not None:
2531
2881
  self._values["twine_username_secret"] = twine_username_secret
2532
2882
 
2883
+ @builtins.property
2884
+ def github_environment(self) -> typing.Optional[builtins.str]:
2885
+ '''(experimental) The GitHub Actions environment used for publishing.
2886
+
2887
+ This can be used to add an explicit approval step to the release
2888
+ or limit who can initiate a release through environment protection rules.
2889
+
2890
+ Set this to overwrite a package level publishing environment just for this artifact.
2891
+
2892
+ :default: - no environment used, unless set at the package level
2893
+
2894
+ :stability: experimental
2895
+ '''
2896
+ result = self._values.get("github_environment")
2897
+ return typing.cast(typing.Optional[builtins.str], result)
2898
+
2533
2899
  @builtins.property
2534
2900
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
2535
2901
  '''(experimental) Steps to execute after executing the publishing command.
@@ -2546,7 +2912,7 @@ class PyPiPublishOptions(CommonPublishOptions):
2546
2912
 
2547
2913
  @builtins.property
2548
2914
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
2549
- '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede.
2915
+ '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed.
2550
2916
 
2551
2917
  These steps are executed after ``dist/`` has been populated with the build
2552
2918
  output.
@@ -2569,6 +2935,44 @@ class PyPiPublishOptions(CommonPublishOptions):
2569
2935
  result = self._values.get("publish_tools")
2570
2936
  return typing.cast(typing.Optional[_Tools_75b93a2a], result)
2571
2937
 
2938
+ @builtins.property
2939
+ def attestations(self) -> typing.Optional[builtins.bool]:
2940
+ '''(experimental) Generate and publish cryptographic attestations for files uploaded to PyPI.
2941
+
2942
+ Attestations provide package provenance and integrity an can be viewed on PyPI.
2943
+ They are only available when using a Trusted Publisher for publishing.
2944
+
2945
+ :default: - enabled when using trusted publishing, otherwise not applicable
2946
+
2947
+ :see: https://docs.pypi.org/attestations/producing-attestations/
2948
+ :stability: experimental
2949
+ '''
2950
+ result = self._values.get("attestations")
2951
+ return typing.cast(typing.Optional[builtins.bool], result)
2952
+
2953
+ @builtins.property
2954
+ def code_artifact_options(self) -> typing.Optional[CodeArtifactOptions]:
2955
+ '''(experimental) Options for publishing to AWS CodeArtifact.
2956
+
2957
+ :default: - undefined
2958
+
2959
+ :stability: experimental
2960
+ '''
2961
+ result = self._values.get("code_artifact_options")
2962
+ return typing.cast(typing.Optional[CodeArtifactOptions], result)
2963
+
2964
+ @builtins.property
2965
+ def trusted_publishing(self) -> typing.Optional[builtins.bool]:
2966
+ '''(experimental) Use PyPI trusted publishing instead of tokens or username & password.
2967
+
2968
+ Needs to be setup in PyPI.
2969
+
2970
+ :see: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
2971
+ :stability: experimental
2972
+ '''
2973
+ result = self._values.get("trusted_publishing")
2974
+ return typing.cast(typing.Optional[builtins.bool], result)
2975
+
2572
2976
  @builtins.property
2573
2977
  def twine_password_secret(self) -> typing.Optional[builtins.str]:
2574
2978
  '''(experimental) The GitHub secret which contains PyPI password.
@@ -2632,14 +3036,17 @@ class Release(
2632
3036
  *,
2633
3037
  artifacts_directory: builtins.str,
2634
3038
  branch: builtins.str,
2635
- task: _Task_9fa875b6,
2636
3039
  version_file: builtins.str,
2637
3040
  github_release: typing.Optional[builtins.bool] = None,
3041
+ task: typing.Optional[_Task_9fa875b6] = None,
3042
+ tasks: typing.Optional[typing.Sequence[_Task_9fa875b6]] = None,
2638
3043
  workflow_node_version: typing.Optional[builtins.str] = None,
2639
3044
  workflow_permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
3045
+ bump_package: typing.Optional[builtins.str] = None,
2640
3046
  jsii_release_version: typing.Optional[builtins.str] = None,
2641
3047
  major_version: typing.Optional[jsii.Number] = None,
2642
3048
  min_major_version: typing.Optional[jsii.Number] = None,
3049
+ next_version_command: typing.Optional[builtins.str] = None,
2643
3050
  npm_dist_tag: typing.Optional[builtins.str] = None,
2644
3051
  post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2645
3052
  prerelease: typing.Optional[builtins.str] = None,
@@ -2647,12 +3054,14 @@ class Release(
2647
3054
  publish_tasks: typing.Optional[builtins.bool] = None,
2648
3055
  releasable_commits: typing.Optional[_ReleasableCommits_d481ce10] = None,
2649
3056
  release_branches: typing.Optional[typing.Mapping[builtins.str, typing.Union[BranchOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
3057
+ release_environment: typing.Optional[builtins.str] = None,
2650
3058
  release_every_commit: typing.Optional[builtins.bool] = None,
2651
3059
  release_failure_issue: typing.Optional[builtins.bool] = None,
2652
3060
  release_failure_issue_label: typing.Optional[builtins.str] = None,
2653
3061
  release_schedule: typing.Optional[builtins.str] = None,
2654
3062
  release_tag_prefix: typing.Optional[builtins.str] = None,
2655
3063
  release_trigger: typing.Optional["ReleaseTrigger"] = None,
3064
+ release_workflow_env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
2656
3065
  release_workflow_name: typing.Optional[builtins.str] = None,
2657
3066
  release_workflow_setup_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2658
3067
  versionrc_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
@@ -2664,14 +3073,17 @@ class Release(
2664
3073
  :param scope: should be part of the project the Release belongs to.
2665
3074
  :param artifacts_directory: (experimental) A directory which will contain build artifacts. Default: "dist"
2666
3075
  :param branch: (experimental) The default branch name to release from. Use ``majorVersion`` to restrict this branch to only publish releases with a specific major version. You can add additional branches using ``addBranch()``.
2667
- :param task: (experimental) The task to execute in order to create the release artifacts. Artifacts are expected to reside under ``artifactsDirectory`` (defaults to ``dist/``) once build is complete.
2668
3076
  :param version_file: (experimental) A name of a .json file to set the ``version`` field in after a bump.
2669
3077
  :param github_release: (experimental) Create a GitHub release for each release. Default: true
2670
- :param workflow_node_version: (experimental) Node version to setup in GitHub workflows if any node-based CLI utilities are needed. For example ``publib``, the CLI projen uses to publish releases, is an npm library. Default: 18.x
3078
+ :param task: (deprecated) The task to execute in order to create the release artifacts. Artifacts are expected to reside under ``artifactsDirectory`` (defaults to ``dist/``) once build is complete.
3079
+ :param tasks: (experimental) The tasks to execute in order to create the release artifacts. Artifacts are expected to reside under ``artifactsDirectory`` (defaults to ``dist/``) once build is complete.
3080
+ :param workflow_node_version: (experimental) Node version to setup in GitHub workflows if any node-based CLI utilities are needed. For example ``publib``, the CLI projen uses to publish releases, is an npm library. Default: "lts/*""
2671
3081
  :param workflow_permissions: (experimental) Permissions granted to the release workflow job. Default: ``{ contents: JobPermission.WRITE }``
3082
+ :param bump_package: (experimental) The ``commit-and-tag-version`` compatible package used to bump the package version, as a dependency string. This can be any compatible package version, including the deprecated ``standard-version@9``. Default: - A recent version of "commit-and-tag-version"
2672
3083
  :param jsii_release_version: (experimental) Version requirement of ``publib`` which is used to publish modules to npm. Default: "latest"
2673
3084
  :param major_version: (experimental) Major version to release from the default branch. If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version. Default: - Major version is not enforced.
2674
3085
  :param min_major_version: (experimental) Minimal Major version to release. This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number. Can not be set together with ``majorVersion``. Default: - No minimum version is being enforced
3086
+ :param next_version_command: (experimental) A shell command to control the next version to release. If present, this shell command will be run before the bump is executed, and it determines what version to release. It will be executed in the following environment: - Working directory: the project directory. - ``$VERSION``: the current version. Looks like ``1.2.3``. - ``$LATEST_TAG``: the most recent tag. Looks like ``prefix-v1.2.3``, or may be unset. - ``$SUGGESTED_BUMP``: the suggested bump action based on commits. One of ``major|minor|patch|none``. The command should print one of the following to ``stdout``: - Nothing: the next version number will be determined based on commit history. - ``x.y.z``: the next version number will be ``x.y.z``. - ``major|minor|patch``: the next version number will be the current version number with the indicated component bumped. This setting cannot be specified together with ``minMajorVersion``; the invoked script can be used to achieve the effects of ``minMajorVersion``. Default: - The next version will be determined based on the commit history and project settings.
2675
3087
  :param npm_dist_tag: (experimental) The npmDistTag to use when publishing from the default branch. To set the npm dist-tag for release branches, set the ``npmDistTag`` property for each branch. Default: "latest"
2676
3088
  :param post_build_steps: (experimental) Steps to execute after build as part of the release workflow. Default: []
2677
3089
  :param prerelease: (experimental) Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). Default: - normal semantic versions
@@ -2679,15 +3091,17 @@ class Release(
2679
3091
  :param publish_tasks: (experimental) Define publishing tasks that can be executed manually as well as workflows. Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity. Default: false
2680
3092
  :param releasable_commits: (experimental) Find commits that should be considered releasable Used to decide if a release is required. Default: ReleasableCommits.everyCommit()
2681
3093
  :param release_branches: (experimental) Defines additional release branches. A workflow will be created for each release branch which will publish releases from commits in this branch. Each release branch *must* be assigned a major version number which is used to enforce that versions published from that branch always use that major version. If multiple branches are used, the ``majorVersion`` field must also be provided for the default branch. Default: - no additional branches are used for release. you can use ``addBranch()`` to add additional branches.
3094
+ :param release_environment: (experimental) The GitHub Actions environment used for the release. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. When multiple artifacts are released, the environment can be overwritten on a per artifact basis. Default: - no environment used, unless set at the artifact level
2682
3095
  :param release_every_commit: (deprecated) Automatically release new versions every commit to one of branches in ``releaseBranches``. Default: true
2683
3096
  :param release_failure_issue: (experimental) Create a github issue on every failed publishing task. Default: false
2684
3097
  :param release_failure_issue_label: (experimental) The label to apply to issues indicating publish failures. Only applies if ``releaseFailureIssue`` is true. Default: "failed-release"
2685
3098
  :param release_schedule: (deprecated) CRON schedule to trigger new releases. Default: - no scheduled releases
2686
3099
  :param release_tag_prefix: (experimental) Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix. Default: "v"
2687
3100
  :param release_trigger: (experimental) The release trigger to use. Default: - Continuous releases (``ReleaseTrigger.continuous()``)
3101
+ :param release_workflow_env: (experimental) Build environment variables for release workflows. Default: {}
2688
3102
  :param release_workflow_name: (experimental) The name of the default release workflow. Default: "release"
2689
3103
  :param release_workflow_setup_steps: (experimental) A set of workflow steps to execute in order to setup the workflow container.
2690
- :param versionrc_options: (experimental) Custom configuration used when creating changelog with standard-version package. Given values either append to default configuration or overwrite values in it. Default: - standard configuration applicable for GitHub repositories
3104
+ :param versionrc_options: (experimental) Custom configuration used when creating changelog with commit-and-tag-version package. Given values either append to default configuration or overwrite values in it. Default: - standard configuration applicable for GitHub repositories
2691
3105
  :param workflow_container_image: (experimental) Container image to use for GitHub workflows. Default: - default image
2692
3106
  :param workflow_runs_on: (experimental) Github Runner selection labels. Default: ["ubuntu-latest"]
2693
3107
  :param workflow_runs_on_group: (experimental) Github Runner Group selection options.
@@ -2700,14 +3114,17 @@ class Release(
2700
3114
  options = ReleaseOptions(
2701
3115
  artifacts_directory=artifacts_directory,
2702
3116
  branch=branch,
2703
- task=task,
2704
3117
  version_file=version_file,
2705
3118
  github_release=github_release,
3119
+ task=task,
3120
+ tasks=tasks,
2706
3121
  workflow_node_version=workflow_node_version,
2707
3122
  workflow_permissions=workflow_permissions,
3123
+ bump_package=bump_package,
2708
3124
  jsii_release_version=jsii_release_version,
2709
3125
  major_version=major_version,
2710
3126
  min_major_version=min_major_version,
3127
+ next_version_command=next_version_command,
2711
3128
  npm_dist_tag=npm_dist_tag,
2712
3129
  post_build_steps=post_build_steps,
2713
3130
  prerelease=prerelease,
@@ -2715,12 +3132,14 @@ class Release(
2715
3132
  publish_tasks=publish_tasks,
2716
3133
  releasable_commits=releasable_commits,
2717
3134
  release_branches=release_branches,
3135
+ release_environment=release_environment,
2718
3136
  release_every_commit=release_every_commit,
2719
3137
  release_failure_issue=release_failure_issue,
2720
3138
  release_failure_issue_label=release_failure_issue_label,
2721
3139
  release_schedule=release_schedule,
2722
3140
  release_tag_prefix=release_tag_prefix,
2723
3141
  release_trigger=release_trigger,
3142
+ release_workflow_env=release_workflow_env,
2724
3143
  release_workflow_name=release_workflow_name,
2725
3144
  release_workflow_setup_steps=release_workflow_setup_steps,
2726
3145
  versionrc_options=versionrc_options,
@@ -2751,6 +3170,7 @@ class Release(
2751
3170
  branch: builtins.str,
2752
3171
  *,
2753
3172
  major_version: jsii.Number,
3173
+ environment: typing.Optional[builtins.str] = None,
2754
3174
  min_major_version: typing.Optional[jsii.Number] = None,
2755
3175
  minor_version: typing.Optional[jsii.Number] = None,
2756
3176
  npm_dist_tag: typing.Optional[builtins.str] = None,
@@ -2766,6 +3186,7 @@ class Release(
2766
3186
 
2767
3187
  :param branch: The branch to monitor (e.g. ``main``, ``v2.x``).
2768
3188
  :param major_version: (experimental) The major versions released from this branch.
3189
+ :param environment: (experimental) The GitHub Actions environment used for the release. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. When multiple artifacts are released, the environment can be overwritten on a per artifact basis. Default: - no environment used, unless set at the artifact level
2769
3190
  :param min_major_version: (experimental) The minimum major version to release.
2770
3191
  :param minor_version: (experimental) The minor versions released from this branch.
2771
3192
  :param npm_dist_tag: (experimental) The npm distribution tag to use for this branch. Default: "latest"
@@ -2780,6 +3201,7 @@ class Release(
2780
3201
  check_type(argname="argument branch", value=branch, expected_type=type_hints["branch"])
2781
3202
  options = BranchOptions(
2782
3203
  major_version=major_version,
3204
+ environment=environment,
2783
3205
  min_major_version=min_major_version,
2784
3206
  minor_version=minor_version,
2785
3207
  npm_dist_tag=npm_dist_tag,
@@ -2854,9 +3276,11 @@ class Release(
2854
3276
  jsii_type="projen.release.ReleaseProjectOptions",
2855
3277
  jsii_struct_bases=[],
2856
3278
  name_mapping={
3279
+ "bump_package": "bumpPackage",
2857
3280
  "jsii_release_version": "jsiiReleaseVersion",
2858
3281
  "major_version": "majorVersion",
2859
3282
  "min_major_version": "minMajorVersion",
3283
+ "next_version_command": "nextVersionCommand",
2860
3284
  "npm_dist_tag": "npmDistTag",
2861
3285
  "post_build_steps": "postBuildSteps",
2862
3286
  "prerelease": "prerelease",
@@ -2864,12 +3288,14 @@ class Release(
2864
3288
  "publish_tasks": "publishTasks",
2865
3289
  "releasable_commits": "releasableCommits",
2866
3290
  "release_branches": "releaseBranches",
3291
+ "release_environment": "releaseEnvironment",
2867
3292
  "release_every_commit": "releaseEveryCommit",
2868
3293
  "release_failure_issue": "releaseFailureIssue",
2869
3294
  "release_failure_issue_label": "releaseFailureIssueLabel",
2870
3295
  "release_schedule": "releaseSchedule",
2871
3296
  "release_tag_prefix": "releaseTagPrefix",
2872
3297
  "release_trigger": "releaseTrigger",
3298
+ "release_workflow_env": "releaseWorkflowEnv",
2873
3299
  "release_workflow_name": "releaseWorkflowName",
2874
3300
  "release_workflow_setup_steps": "releaseWorkflowSetupSteps",
2875
3301
  "versionrc_options": "versionrcOptions",
@@ -2882,9 +3308,11 @@ class ReleaseProjectOptions:
2882
3308
  def __init__(
2883
3309
  self,
2884
3310
  *,
3311
+ bump_package: typing.Optional[builtins.str] = None,
2885
3312
  jsii_release_version: typing.Optional[builtins.str] = None,
2886
3313
  major_version: typing.Optional[jsii.Number] = None,
2887
3314
  min_major_version: typing.Optional[jsii.Number] = None,
3315
+ next_version_command: typing.Optional[builtins.str] = None,
2888
3316
  npm_dist_tag: typing.Optional[builtins.str] = None,
2889
3317
  post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2890
3318
  prerelease: typing.Optional[builtins.str] = None,
@@ -2892,12 +3320,14 @@ class ReleaseProjectOptions:
2892
3320
  publish_tasks: typing.Optional[builtins.bool] = None,
2893
3321
  releasable_commits: typing.Optional[_ReleasableCommits_d481ce10] = None,
2894
3322
  release_branches: typing.Optional[typing.Mapping[builtins.str, typing.Union[BranchOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
3323
+ release_environment: typing.Optional[builtins.str] = None,
2895
3324
  release_every_commit: typing.Optional[builtins.bool] = None,
2896
3325
  release_failure_issue: typing.Optional[builtins.bool] = None,
2897
3326
  release_failure_issue_label: typing.Optional[builtins.str] = None,
2898
3327
  release_schedule: typing.Optional[builtins.str] = None,
2899
3328
  release_tag_prefix: typing.Optional[builtins.str] = None,
2900
3329
  release_trigger: typing.Optional["ReleaseTrigger"] = None,
3330
+ release_workflow_env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
2901
3331
  release_workflow_name: typing.Optional[builtins.str] = None,
2902
3332
  release_workflow_setup_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2903
3333
  versionrc_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
@@ -2907,9 +3337,11 @@ class ReleaseProjectOptions:
2907
3337
  ) -> None:
2908
3338
  '''(experimental) Project options for release.
2909
3339
 
3340
+ :param bump_package: (experimental) The ``commit-and-tag-version`` compatible package used to bump the package version, as a dependency string. This can be any compatible package version, including the deprecated ``standard-version@9``. Default: - A recent version of "commit-and-tag-version"
2910
3341
  :param jsii_release_version: (experimental) Version requirement of ``publib`` which is used to publish modules to npm. Default: "latest"
2911
3342
  :param major_version: (experimental) Major version to release from the default branch. If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version. Default: - Major version is not enforced.
2912
3343
  :param min_major_version: (experimental) Minimal Major version to release. This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number. Can not be set together with ``majorVersion``. Default: - No minimum version is being enforced
3344
+ :param next_version_command: (experimental) A shell command to control the next version to release. If present, this shell command will be run before the bump is executed, and it determines what version to release. It will be executed in the following environment: - Working directory: the project directory. - ``$VERSION``: the current version. Looks like ``1.2.3``. - ``$LATEST_TAG``: the most recent tag. Looks like ``prefix-v1.2.3``, or may be unset. - ``$SUGGESTED_BUMP``: the suggested bump action based on commits. One of ``major|minor|patch|none``. The command should print one of the following to ``stdout``: - Nothing: the next version number will be determined based on commit history. - ``x.y.z``: the next version number will be ``x.y.z``. - ``major|minor|patch``: the next version number will be the current version number with the indicated component bumped. This setting cannot be specified together with ``minMajorVersion``; the invoked script can be used to achieve the effects of ``minMajorVersion``. Default: - The next version will be determined based on the commit history and project settings.
2913
3345
  :param npm_dist_tag: (experimental) The npmDistTag to use when publishing from the default branch. To set the npm dist-tag for release branches, set the ``npmDistTag`` property for each branch. Default: "latest"
2914
3346
  :param post_build_steps: (experimental) Steps to execute after build as part of the release workflow. Default: []
2915
3347
  :param prerelease: (experimental) Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). Default: - normal semantic versions
@@ -2917,15 +3349,17 @@ class ReleaseProjectOptions:
2917
3349
  :param publish_tasks: (experimental) Define publishing tasks that can be executed manually as well as workflows. Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity. Default: false
2918
3350
  :param releasable_commits: (experimental) Find commits that should be considered releasable Used to decide if a release is required. Default: ReleasableCommits.everyCommit()
2919
3351
  :param release_branches: (experimental) Defines additional release branches. A workflow will be created for each release branch which will publish releases from commits in this branch. Each release branch *must* be assigned a major version number which is used to enforce that versions published from that branch always use that major version. If multiple branches are used, the ``majorVersion`` field must also be provided for the default branch. Default: - no additional branches are used for release. you can use ``addBranch()`` to add additional branches.
3352
+ :param release_environment: (experimental) The GitHub Actions environment used for the release. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. When multiple artifacts are released, the environment can be overwritten on a per artifact basis. Default: - no environment used, unless set at the artifact level
2920
3353
  :param release_every_commit: (deprecated) Automatically release new versions every commit to one of branches in ``releaseBranches``. Default: true
2921
3354
  :param release_failure_issue: (experimental) Create a github issue on every failed publishing task. Default: false
2922
3355
  :param release_failure_issue_label: (experimental) The label to apply to issues indicating publish failures. Only applies if ``releaseFailureIssue`` is true. Default: "failed-release"
2923
3356
  :param release_schedule: (deprecated) CRON schedule to trigger new releases. Default: - no scheduled releases
2924
3357
  :param release_tag_prefix: (experimental) Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix. Default: "v"
2925
3358
  :param release_trigger: (experimental) The release trigger to use. Default: - Continuous releases (``ReleaseTrigger.continuous()``)
3359
+ :param release_workflow_env: (experimental) Build environment variables for release workflows. Default: {}
2926
3360
  :param release_workflow_name: (experimental) The name of the default release workflow. Default: "release"
2927
3361
  :param release_workflow_setup_steps: (experimental) A set of workflow steps to execute in order to setup the workflow container.
2928
- :param versionrc_options: (experimental) Custom configuration used when creating changelog with standard-version package. Given values either append to default configuration or overwrite values in it. Default: - standard configuration applicable for GitHub repositories
3362
+ :param versionrc_options: (experimental) Custom configuration used when creating changelog with commit-and-tag-version package. Given values either append to default configuration or overwrite values in it. Default: - standard configuration applicable for GitHub repositories
2929
3363
  :param workflow_container_image: (experimental) Container image to use for GitHub workflows. Default: - default image
2930
3364
  :param workflow_runs_on: (experimental) Github Runner selection labels. Default: ["ubuntu-latest"]
2931
3365
  :param workflow_runs_on_group: (experimental) Github Runner Group selection options.
@@ -2936,9 +3370,11 @@ class ReleaseProjectOptions:
2936
3370
  workflow_runs_on_group = _GroupRunnerOptions_148c59c1(**workflow_runs_on_group)
2937
3371
  if __debug__:
2938
3372
  type_hints = typing.get_type_hints(_typecheckingstub__cc5e99254de9f29d2ac3b86e193164816e1ed36e491e602128e7d16fb86aa377)
3373
+ check_type(argname="argument bump_package", value=bump_package, expected_type=type_hints["bump_package"])
2939
3374
  check_type(argname="argument jsii_release_version", value=jsii_release_version, expected_type=type_hints["jsii_release_version"])
2940
3375
  check_type(argname="argument major_version", value=major_version, expected_type=type_hints["major_version"])
2941
3376
  check_type(argname="argument min_major_version", value=min_major_version, expected_type=type_hints["min_major_version"])
3377
+ check_type(argname="argument next_version_command", value=next_version_command, expected_type=type_hints["next_version_command"])
2942
3378
  check_type(argname="argument npm_dist_tag", value=npm_dist_tag, expected_type=type_hints["npm_dist_tag"])
2943
3379
  check_type(argname="argument post_build_steps", value=post_build_steps, expected_type=type_hints["post_build_steps"])
2944
3380
  check_type(argname="argument prerelease", value=prerelease, expected_type=type_hints["prerelease"])
@@ -2946,12 +3382,14 @@ class ReleaseProjectOptions:
2946
3382
  check_type(argname="argument publish_tasks", value=publish_tasks, expected_type=type_hints["publish_tasks"])
2947
3383
  check_type(argname="argument releasable_commits", value=releasable_commits, expected_type=type_hints["releasable_commits"])
2948
3384
  check_type(argname="argument release_branches", value=release_branches, expected_type=type_hints["release_branches"])
3385
+ check_type(argname="argument release_environment", value=release_environment, expected_type=type_hints["release_environment"])
2949
3386
  check_type(argname="argument release_every_commit", value=release_every_commit, expected_type=type_hints["release_every_commit"])
2950
3387
  check_type(argname="argument release_failure_issue", value=release_failure_issue, expected_type=type_hints["release_failure_issue"])
2951
3388
  check_type(argname="argument release_failure_issue_label", value=release_failure_issue_label, expected_type=type_hints["release_failure_issue_label"])
2952
3389
  check_type(argname="argument release_schedule", value=release_schedule, expected_type=type_hints["release_schedule"])
2953
3390
  check_type(argname="argument release_tag_prefix", value=release_tag_prefix, expected_type=type_hints["release_tag_prefix"])
2954
3391
  check_type(argname="argument release_trigger", value=release_trigger, expected_type=type_hints["release_trigger"])
3392
+ check_type(argname="argument release_workflow_env", value=release_workflow_env, expected_type=type_hints["release_workflow_env"])
2955
3393
  check_type(argname="argument release_workflow_name", value=release_workflow_name, expected_type=type_hints["release_workflow_name"])
2956
3394
  check_type(argname="argument release_workflow_setup_steps", value=release_workflow_setup_steps, expected_type=type_hints["release_workflow_setup_steps"])
2957
3395
  check_type(argname="argument versionrc_options", value=versionrc_options, expected_type=type_hints["versionrc_options"])
@@ -2959,12 +3397,16 @@ class ReleaseProjectOptions:
2959
3397
  check_type(argname="argument workflow_runs_on", value=workflow_runs_on, expected_type=type_hints["workflow_runs_on"])
2960
3398
  check_type(argname="argument workflow_runs_on_group", value=workflow_runs_on_group, expected_type=type_hints["workflow_runs_on_group"])
2961
3399
  self._values: typing.Dict[builtins.str, typing.Any] = {}
3400
+ if bump_package is not None:
3401
+ self._values["bump_package"] = bump_package
2962
3402
  if jsii_release_version is not None:
2963
3403
  self._values["jsii_release_version"] = jsii_release_version
2964
3404
  if major_version is not None:
2965
3405
  self._values["major_version"] = major_version
2966
3406
  if min_major_version is not None:
2967
3407
  self._values["min_major_version"] = min_major_version
3408
+ if next_version_command is not None:
3409
+ self._values["next_version_command"] = next_version_command
2968
3410
  if npm_dist_tag is not None:
2969
3411
  self._values["npm_dist_tag"] = npm_dist_tag
2970
3412
  if post_build_steps is not None:
@@ -2979,6 +3421,8 @@ class ReleaseProjectOptions:
2979
3421
  self._values["releasable_commits"] = releasable_commits
2980
3422
  if release_branches is not None:
2981
3423
  self._values["release_branches"] = release_branches
3424
+ if release_environment is not None:
3425
+ self._values["release_environment"] = release_environment
2982
3426
  if release_every_commit is not None:
2983
3427
  self._values["release_every_commit"] = release_every_commit
2984
3428
  if release_failure_issue is not None:
@@ -2991,6 +3435,8 @@ class ReleaseProjectOptions:
2991
3435
  self._values["release_tag_prefix"] = release_tag_prefix
2992
3436
  if release_trigger is not None:
2993
3437
  self._values["release_trigger"] = release_trigger
3438
+ if release_workflow_env is not None:
3439
+ self._values["release_workflow_env"] = release_workflow_env
2994
3440
  if release_workflow_name is not None:
2995
3441
  self._values["release_workflow_name"] = release_workflow_name
2996
3442
  if release_workflow_setup_steps is not None:
@@ -3004,6 +3450,19 @@ class ReleaseProjectOptions:
3004
3450
  if workflow_runs_on_group is not None:
3005
3451
  self._values["workflow_runs_on_group"] = workflow_runs_on_group
3006
3452
 
3453
+ @builtins.property
3454
+ def bump_package(self) -> typing.Optional[builtins.str]:
3455
+ '''(experimental) The ``commit-and-tag-version`` compatible package used to bump the package version, as a dependency string.
3456
+
3457
+ This can be any compatible package version, including the deprecated ``standard-version@9``.
3458
+
3459
+ :default: - A recent version of "commit-and-tag-version"
3460
+
3461
+ :stability: experimental
3462
+ '''
3463
+ result = self._values.get("bump_package")
3464
+ return typing.cast(typing.Optional[builtins.str], result)
3465
+
3007
3466
  @builtins.property
3008
3467
  def jsii_release_version(self) -> typing.Optional[builtins.str]:
3009
3468
  '''(experimental) Version requirement of ``publib`` which is used to publish modules to npm.
@@ -3045,6 +3504,36 @@ class ReleaseProjectOptions:
3045
3504
  result = self._values.get("min_major_version")
3046
3505
  return typing.cast(typing.Optional[jsii.Number], result)
3047
3506
 
3507
+ @builtins.property
3508
+ def next_version_command(self) -> typing.Optional[builtins.str]:
3509
+ '''(experimental) A shell command to control the next version to release.
3510
+
3511
+ If present, this shell command will be run before the bump is executed, and
3512
+ it determines what version to release. It will be executed in the following
3513
+ environment:
3514
+
3515
+ - Working directory: the project directory.
3516
+ - ``$VERSION``: the current version. Looks like ``1.2.3``.
3517
+ - ``$LATEST_TAG``: the most recent tag. Looks like ``prefix-v1.2.3``, or may be unset.
3518
+ - ``$SUGGESTED_BUMP``: the suggested bump action based on commits. One of ``major|minor|patch|none``.
3519
+
3520
+ The command should print one of the following to ``stdout``:
3521
+
3522
+ - Nothing: the next version number will be determined based on commit history.
3523
+ - ``x.y.z``: the next version number will be ``x.y.z``.
3524
+ - ``major|minor|patch``: the next version number will be the current version number
3525
+ with the indicated component bumped.
3526
+
3527
+ This setting cannot be specified together with ``minMajorVersion``; the invoked
3528
+ script can be used to achieve the effects of ``minMajorVersion``.
3529
+
3530
+ :default: - The next version will be determined based on the commit history and project settings.
3531
+
3532
+ :stability: experimental
3533
+ '''
3534
+ result = self._values.get("next_version_command")
3535
+ return typing.cast(typing.Optional[builtins.str], result)
3536
+
3048
3537
  @builtins.property
3049
3538
  def npm_dist_tag(self) -> typing.Optional[builtins.str]:
3050
3539
  '''(experimental) The npmDistTag to use when publishing from the default branch.
@@ -3140,6 +3629,23 @@ class ReleaseProjectOptions:
3140
3629
  result = self._values.get("release_branches")
3141
3630
  return typing.cast(typing.Optional[typing.Mapping[builtins.str, BranchOptions]], result)
3142
3631
 
3632
+ @builtins.property
3633
+ def release_environment(self) -> typing.Optional[builtins.str]:
3634
+ '''(experimental) The GitHub Actions environment used for the release.
3635
+
3636
+ This can be used to add an explicit approval step to the release
3637
+ or limit who can initiate a release through environment protection rules.
3638
+
3639
+ When multiple artifacts are released, the environment can be overwritten
3640
+ on a per artifact basis.
3641
+
3642
+ :default: - no environment used, unless set at the artifact level
3643
+
3644
+ :stability: experimental
3645
+ '''
3646
+ result = self._values.get("release_environment")
3647
+ return typing.cast(typing.Optional[builtins.str], result)
3648
+
3143
3649
  @builtins.property
3144
3650
  def release_every_commit(self) -> typing.Optional[builtins.bool]:
3145
3651
  '''(deprecated) Automatically release new versions every commit to one of branches in ``releaseBranches``.
@@ -3217,6 +3723,19 @@ class ReleaseProjectOptions:
3217
3723
  result = self._values.get("release_trigger")
3218
3724
  return typing.cast(typing.Optional["ReleaseTrigger"], result)
3219
3725
 
3726
+ @builtins.property
3727
+ def release_workflow_env(
3728
+ self,
3729
+ ) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
3730
+ '''(experimental) Build environment variables for release workflows.
3731
+
3732
+ :default: {}
3733
+
3734
+ :stability: experimental
3735
+ '''
3736
+ result = self._values.get("release_workflow_env")
3737
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
3738
+
3220
3739
  @builtins.property
3221
3740
  def release_workflow_name(self) -> typing.Optional[builtins.str]:
3222
3741
  '''(experimental) The name of the default release workflow.
@@ -3243,7 +3762,7 @@ class ReleaseProjectOptions:
3243
3762
  def versionrc_options(
3244
3763
  self,
3245
3764
  ) -> typing.Optional[typing.Mapping[builtins.str, typing.Any]]:
3246
- '''(experimental) Custom configuration used when creating changelog with standard-version package.
3765
+ '''(experimental) Custom configuration used when creating changelog with commit-and-tag-version package.
3247
3766
 
3248
3767
  Given values either append to default configuration or overwrite values in it.
3249
3768
 
@@ -3315,14 +3834,22 @@ class ReleaseTrigger(
3315
3834
 
3316
3835
  @jsii.member(jsii_name="continuous")
3317
3836
  @builtins.classmethod
3318
- def continuous(cls) -> "ReleaseTrigger":
3837
+ def continuous(
3838
+ cls,
3839
+ *,
3840
+ paths: typing.Optional[typing.Sequence[builtins.str]] = None,
3841
+ ) -> "ReleaseTrigger":
3319
3842
  '''(experimental) Creates a continuous release trigger.
3320
3843
 
3321
3844
  Automated releases will occur on every commit.
3322
3845
 
3846
+ :param paths: (experimental) Paths for which pushes should trigger a release.
3847
+
3323
3848
  :stability: experimental
3324
3849
  '''
3325
- return typing.cast("ReleaseTrigger", jsii.sinvoke(cls, "continuous", []))
3850
+ options = ContinuousReleaseOptions(paths=paths)
3851
+
3852
+ return typing.cast("ReleaseTrigger", jsii.sinvoke(cls, "continuous", [options]))
3326
3853
 
3327
3854
  @jsii.member(jsii_name="manual")
3328
3855
  @builtins.classmethod
@@ -3376,6 +3903,15 @@ class ReleaseTrigger(
3376
3903
 
3377
3904
  return typing.cast("ReleaseTrigger", jsii.sinvoke(cls, "scheduled", [options]))
3378
3905
 
3906
+ @jsii.member(jsii_name="workflowDispatch")
3907
+ @builtins.classmethod
3908
+ def workflow_dispatch(cls) -> "ReleaseTrigger":
3909
+ '''(experimental) The release can only be triggered using the GitHub UI.
3910
+
3911
+ :stability: experimental
3912
+ '''
3913
+ return typing.cast("ReleaseTrigger", jsii.sinvoke(cls, "workflowDispatch", []))
3914
+
3379
3915
  @builtins.property
3380
3916
  @jsii.member(jsii_name="isContinuous")
3381
3917
  def is_continuous(self) -> builtins.bool:
@@ -3388,7 +3924,9 @@ class ReleaseTrigger(
3388
3924
  @builtins.property
3389
3925
  @jsii.member(jsii_name="isManual")
3390
3926
  def is_manual(self) -> builtins.bool:
3391
- '''(experimental) Whether or not this is a manual release trigger.
3927
+ '''(experimental) Whether or not this is a release trigger with a manual task run in a working copy.
3928
+
3929
+ If the ``ReleaseTrigger`` is a GitHub-only manual task, this will return ``false``.
3392
3930
 
3393
3931
  :stability: experimental
3394
3932
  '''
@@ -3414,6 +3952,15 @@ class ReleaseTrigger(
3414
3952
  '''
3415
3953
  return typing.cast(typing.Optional[builtins.str], jsii.get(self, "gitPushCommand"))
3416
3954
 
3955
+ @builtins.property
3956
+ @jsii.member(jsii_name="paths")
3957
+ def paths(self) -> typing.Optional[typing.List[builtins.str]]:
3958
+ '''(experimental) Paths for which pushes will trigger a release when ``isContinuous`` is ``true``.
3959
+
3960
+ :stability: experimental
3961
+ '''
3962
+ return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "paths"))
3963
+
3417
3964
  @builtins.property
3418
3965
  @jsii.member(jsii_name="schedule")
3419
3966
  def schedule(self) -> typing.Optional[builtins.str]:
@@ -3481,6 +4028,7 @@ class ScheduledReleaseOptions:
3481
4028
  jsii_type="projen.release.JsiiReleaseMaven",
3482
4029
  jsii_struct_bases=[MavenPublishOptions],
3483
4030
  name_mapping={
4031
+ "github_environment": "githubEnvironment",
3484
4032
  "post_publish_steps": "postPublishSteps",
3485
4033
  "pre_publish_steps": "prePublishSteps",
3486
4034
  "publish_tools": "publishTools",
@@ -3498,6 +4046,7 @@ class JsiiReleaseMaven(MavenPublishOptions):
3498
4046
  def __init__(
3499
4047
  self,
3500
4048
  *,
4049
+ github_environment: typing.Optional[builtins.str] = None,
3501
4050
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
3502
4051
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
3503
4052
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -3511,15 +4060,16 @@ class JsiiReleaseMaven(MavenPublishOptions):
3511
4060
  maven_username: typing.Optional[builtins.str] = None,
3512
4061
  ) -> None:
3513
4062
  '''
4063
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
3514
4064
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
3515
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
4065
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
3516
4066
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
3517
- :param maven_endpoint: (experimental) URL of Nexus repository. if not set, defaults to https://oss.sonatype.org Default: "https://oss.sonatype.org"
4067
+ :param maven_endpoint: (experimental) URL of Nexus repository. if not set, defaults to https://oss.sonatype.org Default: - "https://oss.sonatype.org" or none when publishing to Maven Central
3518
4068
  :param maven_gpg_private_key_passphrase: (experimental) GitHub secret name which contains the GPG private key or file that includes it. This is used to sign your Maven packages. See instructions. Default: "MAVEN_GPG_PRIVATE_KEY_PASSPHRASE" or not set when using GitHub Packages
3519
4069
  :param maven_gpg_private_key_secret: (experimental) GitHub secret name which contains the GPG private key or file that includes it. This is used to sign your Maven packages. See instructions. Default: "MAVEN_GPG_PRIVATE_KEY" or not set when using GitHub Packages
3520
4070
  :param maven_password: (experimental) GitHub secret name which contains the Password for maven repository. For Maven Central, you will need to Create JIRA account and then request a new project (see links). Default: "MAVEN_PASSWORD" or "GITHUB_TOKEN" when using GitHub Packages
3521
4071
  :param maven_repository_url: (experimental) Deployment repository when not deploying to Maven Central. Default: - not set
3522
- :param maven_server_id: (experimental) Used in maven settings for credential lookup (e.g. use github when publishing to GitHub). Default: "ossrh" (Maven Central) or "github" when using GitHub Packages
4072
+ :param maven_server_id: (experimental) Used in maven settings for credential lookup (e.g. use github when publishing to GitHub). Set to ``central-ossrh`` to publish to Maven Central. Default: "central-ossrh" (Maven Central) or "github" when using GitHub Packages
3523
4073
  :param maven_staging_profile_id: (experimental) GitHub secret name which contains the Maven Central (sonatype) staging profile ID (e.g. 68a05363083174). Staging profile ID can be found in the URL of the "Releases" staging profile under "Staging Profiles" in https://oss.sonatype.org (e.g. https://oss.sonatype.org/#stagingProfiles;11a33451234521). Default: "MAVEN_STAGING_PROFILE_ID" or not set when using GitHub Packages
3524
4074
  :param maven_username: (experimental) GitHub secret name which contains the Username for maven repository. For Maven Central, you will need to Create JIRA account and then request a new project (see links). Default: "MAVEN_USERNAME" or the GitHub Actor when using GitHub Packages
3525
4075
 
@@ -3531,6 +4081,7 @@ class JsiiReleaseMaven(MavenPublishOptions):
3531
4081
  publish_tools = _Tools_75b93a2a(**publish_tools)
3532
4082
  if __debug__:
3533
4083
  type_hints = typing.get_type_hints(_typecheckingstub__370b478ebba8352e12c41a67b57d5954055dba8a6ceae59144e72607fdc6df41)
4084
+ check_type(argname="argument github_environment", value=github_environment, expected_type=type_hints["github_environment"])
3534
4085
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
3535
4086
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
3536
4087
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
@@ -3543,6 +4094,8 @@ class JsiiReleaseMaven(MavenPublishOptions):
3543
4094
  check_type(argname="argument maven_staging_profile_id", value=maven_staging_profile_id, expected_type=type_hints["maven_staging_profile_id"])
3544
4095
  check_type(argname="argument maven_username", value=maven_username, expected_type=type_hints["maven_username"])
3545
4096
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4097
+ if github_environment is not None:
4098
+ self._values["github_environment"] = github_environment
3546
4099
  if post_publish_steps is not None:
3547
4100
  self._values["post_publish_steps"] = post_publish_steps
3548
4101
  if pre_publish_steps is not None:
@@ -3566,6 +4119,22 @@ class JsiiReleaseMaven(MavenPublishOptions):
3566
4119
  if maven_username is not None:
3567
4120
  self._values["maven_username"] = maven_username
3568
4121
 
4122
+ @builtins.property
4123
+ def github_environment(self) -> typing.Optional[builtins.str]:
4124
+ '''(experimental) The GitHub Actions environment used for publishing.
4125
+
4126
+ This can be used to add an explicit approval step to the release
4127
+ or limit who can initiate a release through environment protection rules.
4128
+
4129
+ Set this to overwrite a package level publishing environment just for this artifact.
4130
+
4131
+ :default: - no environment used, unless set at the package level
4132
+
4133
+ :stability: experimental
4134
+ '''
4135
+ result = self._values.get("github_environment")
4136
+ return typing.cast(typing.Optional[builtins.str], result)
4137
+
3569
4138
  @builtins.property
3570
4139
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
3571
4140
  '''(experimental) Steps to execute after executing the publishing command.
@@ -3582,7 +4151,7 @@ class JsiiReleaseMaven(MavenPublishOptions):
3582
4151
 
3583
4152
  @builtins.property
3584
4153
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
3585
- '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede.
4154
+ '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed.
3586
4155
 
3587
4156
  These steps are executed after ``dist/`` has been populated with the build
3588
4157
  output.
@@ -3611,7 +4180,7 @@ class JsiiReleaseMaven(MavenPublishOptions):
3611
4180
 
3612
4181
  if not set, defaults to https://oss.sonatype.org
3613
4182
 
3614
- :default: "https://oss.sonatype.org"
4183
+ :default: - "https://oss.sonatype.org" or none when publishing to Maven Central
3615
4184
 
3616
4185
  :stability: experimental
3617
4186
  '''
@@ -3677,7 +4246,9 @@ class JsiiReleaseMaven(MavenPublishOptions):
3677
4246
  def maven_server_id(self) -> typing.Optional[builtins.str]:
3678
4247
  '''(experimental) Used in maven settings for credential lookup (e.g. use github when publishing to GitHub).
3679
4248
 
3680
- :default: "ossrh" (Maven Central) or "github" when using GitHub Packages
4249
+ Set to ``central-ossrh`` to publish to Maven Central.
4250
+
4251
+ :default: "central-ossrh" (Maven Central) or "github" when using GitHub Packages
3681
4252
 
3682
4253
  :stability: experimental
3683
4254
  '''
@@ -3726,35 +4297,44 @@ class JsiiReleaseMaven(MavenPublishOptions):
3726
4297
  jsii_type="projen.release.JsiiReleaseNpm",
3727
4298
  jsii_struct_bases=[NpmPublishOptions],
3728
4299
  name_mapping={
4300
+ "github_environment": "githubEnvironment",
3729
4301
  "post_publish_steps": "postPublishSteps",
3730
4302
  "pre_publish_steps": "prePublishSteps",
3731
4303
  "publish_tools": "publishTools",
3732
4304
  "code_artifact_options": "codeArtifactOptions",
3733
4305
  "dist_tag": "distTag",
4306
+ "npm_provenance": "npmProvenance",
3734
4307
  "npm_token_secret": "npmTokenSecret",
3735
4308
  "registry": "registry",
4309
+ "trusted_publishing": "trustedPublishing",
3736
4310
  },
3737
4311
  )
3738
4312
  class JsiiReleaseNpm(NpmPublishOptions):
3739
4313
  def __init__(
3740
4314
  self,
3741
4315
  *,
4316
+ github_environment: typing.Optional[builtins.str] = None,
3742
4317
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
3743
4318
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
3744
4319
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
3745
4320
  code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
3746
4321
  dist_tag: typing.Optional[builtins.str] = None,
4322
+ npm_provenance: typing.Optional[builtins.bool] = None,
3747
4323
  npm_token_secret: typing.Optional[builtins.str] = None,
3748
4324
  registry: typing.Optional[builtins.str] = None,
4325
+ trusted_publishing: typing.Optional[builtins.bool] = None,
3749
4326
  ) -> None:
3750
4327
  '''
4328
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
3751
4329
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
3752
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
4330
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
3753
4331
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
3754
- :param code_artifact_options: (experimental) Options for publishing npm package to AWS CodeArtifact. Default: - undefined
4332
+ :param code_artifact_options: (experimental) Options for publishing npm package to AWS CodeArtifact. Default: - package is not published to
3755
4333
  :param dist_tag: (deprecated) Tags can be used to provide an alias instead of version numbers. For example, a project might choose to have multiple streams of development and use a different tag for each stream, e.g., stable, beta, dev, canary. By default, the ``latest`` tag is used by npm to identify the current version of a package, and ``npm install <pkg>`` (without any ``@<version>`` or ``@<tag>`` specifier) installs the latest tag. Typically, projects only use the ``latest`` tag for stable release versions, and use other tags for unstable versions such as prereleases. The ``next`` tag is used by some projects to identify the upcoming version. Default: "latest"
3756
- :param npm_token_secret: (experimental) GitHub secret which contains the NPM token to use when publishing packages. Default: - "NPM_TOKEN" or "GITHUB_TOKEN" if ``registry`` is set to ``npm.pkg.github.com``.
4334
+ :param npm_provenance: (experimental) Should provenance statements be generated when package is published. Note that this component is using ``publib`` to publish packages, which is using npm internally and supports provenance statements independently of the package manager used. Only works in supported CI/CD environments. Default: - enabled for for public packages using trusted publishing, disabled otherwise
4335
+ :param npm_token_secret: (experimental) GitHub secret which contains the NPM token to use for publishing packages. Default: - "NPM_TOKEN" or "GITHUB_TOKEN" if ``registry`` is set to ``npm.pkg.github.com``.
3757
4336
  :param registry: (experimental) The domain name of the npm package registry. To publish to GitHub Packages, set this value to ``"npm.pkg.github.com"``. In this if ``npmTokenSecret`` is not specified, it will default to ``GITHUB_TOKEN`` which means that you will be able to publish to the repository's package store. In this case, make sure ``repositoryUrl`` is correctly defined. Default: "registry.npmjs.org"
4337
+ :param trusted_publishing: (experimental) Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work. Requires npm CLI version 11.5.1 or later, this is NOT ensured automatically. When used, ``npmTokenSecret`` will be ignored. Default: - false
3758
4338
 
3759
4339
  :deprecated: Use ``NpmPublishOptions`` instead.
3760
4340
 
@@ -3766,14 +4346,19 @@ class JsiiReleaseNpm(NpmPublishOptions):
3766
4346
  code_artifact_options = CodeArtifactOptions(**code_artifact_options)
3767
4347
  if __debug__:
3768
4348
  type_hints = typing.get_type_hints(_typecheckingstub__a34680d3cf9e2cc6374987796717402a524a0bb377e9172f0707da67450b3239)
4349
+ check_type(argname="argument github_environment", value=github_environment, expected_type=type_hints["github_environment"])
3769
4350
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
3770
4351
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
3771
4352
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
3772
4353
  check_type(argname="argument code_artifact_options", value=code_artifact_options, expected_type=type_hints["code_artifact_options"])
3773
4354
  check_type(argname="argument dist_tag", value=dist_tag, expected_type=type_hints["dist_tag"])
4355
+ check_type(argname="argument npm_provenance", value=npm_provenance, expected_type=type_hints["npm_provenance"])
3774
4356
  check_type(argname="argument npm_token_secret", value=npm_token_secret, expected_type=type_hints["npm_token_secret"])
3775
4357
  check_type(argname="argument registry", value=registry, expected_type=type_hints["registry"])
4358
+ check_type(argname="argument trusted_publishing", value=trusted_publishing, expected_type=type_hints["trusted_publishing"])
3776
4359
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4360
+ if github_environment is not None:
4361
+ self._values["github_environment"] = github_environment
3777
4362
  if post_publish_steps is not None:
3778
4363
  self._values["post_publish_steps"] = post_publish_steps
3779
4364
  if pre_publish_steps is not None:
@@ -3784,10 +4369,30 @@ class JsiiReleaseNpm(NpmPublishOptions):
3784
4369
  self._values["code_artifact_options"] = code_artifact_options
3785
4370
  if dist_tag is not None:
3786
4371
  self._values["dist_tag"] = dist_tag
4372
+ if npm_provenance is not None:
4373
+ self._values["npm_provenance"] = npm_provenance
3787
4374
  if npm_token_secret is not None:
3788
4375
  self._values["npm_token_secret"] = npm_token_secret
3789
4376
  if registry is not None:
3790
4377
  self._values["registry"] = registry
4378
+ if trusted_publishing is not None:
4379
+ self._values["trusted_publishing"] = trusted_publishing
4380
+
4381
+ @builtins.property
4382
+ def github_environment(self) -> typing.Optional[builtins.str]:
4383
+ '''(experimental) The GitHub Actions environment used for publishing.
4384
+
4385
+ This can be used to add an explicit approval step to the release
4386
+ or limit who can initiate a release through environment protection rules.
4387
+
4388
+ Set this to overwrite a package level publishing environment just for this artifact.
4389
+
4390
+ :default: - no environment used, unless set at the package level
4391
+
4392
+ :stability: experimental
4393
+ '''
4394
+ result = self._values.get("github_environment")
4395
+ return typing.cast(typing.Optional[builtins.str], result)
3791
4396
 
3792
4397
  @builtins.property
3793
4398
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
@@ -3805,7 +4410,7 @@ class JsiiReleaseNpm(NpmPublishOptions):
3805
4410
 
3806
4411
  @builtins.property
3807
4412
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
3808
- '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede.
4413
+ '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed.
3809
4414
 
3810
4415
  These steps are executed after ``dist/`` has been populated with the build
3811
4416
  output.
@@ -3832,7 +4437,7 @@ class JsiiReleaseNpm(NpmPublishOptions):
3832
4437
  def code_artifact_options(self) -> typing.Optional[CodeArtifactOptions]:
3833
4438
  '''(experimental) Options for publishing npm package to AWS CodeArtifact.
3834
4439
 
3835
- :default: - undefined
4440
+ :default: - package is not published to
3836
4441
 
3837
4442
  :stability: experimental
3838
4443
  '''
@@ -3863,9 +4468,26 @@ class JsiiReleaseNpm(NpmPublishOptions):
3863
4468
  result = self._values.get("dist_tag")
3864
4469
  return typing.cast(typing.Optional[builtins.str], result)
3865
4470
 
4471
+ @builtins.property
4472
+ def npm_provenance(self) -> typing.Optional[builtins.bool]:
4473
+ '''(experimental) Should provenance statements be generated when package is published.
4474
+
4475
+ Note that this component is using ``publib`` to publish packages,
4476
+ which is using npm internally and supports provenance statements independently of the package manager used.
4477
+
4478
+ Only works in supported CI/CD environments.
4479
+
4480
+ :default: - enabled for for public packages using trusted publishing, disabled otherwise
4481
+
4482
+ :see: https://docs.npmjs.com/generating-provenance-statements
4483
+ :stability: experimental
4484
+ '''
4485
+ result = self._values.get("npm_provenance")
4486
+ return typing.cast(typing.Optional[builtins.bool], result)
4487
+
3866
4488
  @builtins.property
3867
4489
  def npm_token_secret(self) -> typing.Optional[builtins.str]:
3868
- '''(experimental) GitHub secret which contains the NPM token to use when publishing packages.
4490
+ '''(experimental) GitHub secret which contains the NPM token to use for publishing packages.
3869
4491
 
3870
4492
  :default: - "NPM_TOKEN" or "GITHUB_TOKEN" if ``registry`` is set to ``npm.pkg.github.com``.
3871
4493
 
@@ -3895,6 +4517,21 @@ class JsiiReleaseNpm(NpmPublishOptions):
3895
4517
  result = self._values.get("registry")
3896
4518
  return typing.cast(typing.Optional[builtins.str], result)
3897
4519
 
4520
+ @builtins.property
4521
+ def trusted_publishing(self) -> typing.Optional[builtins.bool]:
4522
+ '''(experimental) Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work.
4523
+
4524
+ Requires npm CLI version 11.5.1 or later, this is NOT ensured automatically.
4525
+ When used, ``npmTokenSecret`` will be ignored.
4526
+
4527
+ :default: - false
4528
+
4529
+ :see: https://docs.npmjs.com/trusted-publishers
4530
+ :stability: experimental
4531
+ '''
4532
+ result = self._values.get("trusted_publishing")
4533
+ return typing.cast(typing.Optional[builtins.bool], result)
4534
+
3898
4535
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
3899
4536
  return isinstance(rhs, self.__class__) and rhs._values == self._values
3900
4537
 
@@ -3911,29 +4548,38 @@ class JsiiReleaseNpm(NpmPublishOptions):
3911
4548
  jsii_type="projen.release.JsiiReleaseNuget",
3912
4549
  jsii_struct_bases=[NugetPublishOptions],
3913
4550
  name_mapping={
4551
+ "github_environment": "githubEnvironment",
3914
4552
  "post_publish_steps": "postPublishSteps",
3915
4553
  "pre_publish_steps": "prePublishSteps",
3916
4554
  "publish_tools": "publishTools",
3917
4555
  "nuget_api_key_secret": "nugetApiKeySecret",
3918
4556
  "nuget_server": "nugetServer",
4557
+ "nuget_username_secret": "nugetUsernameSecret",
4558
+ "trusted_publishing": "trustedPublishing",
3919
4559
  },
3920
4560
  )
3921
4561
  class JsiiReleaseNuget(NugetPublishOptions):
3922
4562
  def __init__(
3923
4563
  self,
3924
4564
  *,
4565
+ github_environment: typing.Optional[builtins.str] = None,
3925
4566
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
3926
4567
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
3927
4568
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
3928
4569
  nuget_api_key_secret: typing.Optional[builtins.str] = None,
3929
4570
  nuget_server: typing.Optional[builtins.str] = None,
4571
+ nuget_username_secret: typing.Optional[builtins.str] = None,
4572
+ trusted_publishing: typing.Optional[builtins.bool] = None,
3930
4573
  ) -> None:
3931
4574
  '''
4575
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
3932
4576
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
3933
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
4577
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
3934
4578
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
3935
4579
  :param nuget_api_key_secret: (experimental) GitHub secret which contains the API key for NuGet. Default: "NUGET_API_KEY"
3936
4580
  :param nuget_server: (experimental) NuGet Server URL (defaults to nuget.org).
4581
+ :param nuget_username_secret: (experimental) The NuGet.org username (profile name, not email address) for trusted publisher authentication. Required when using trusted publishing. Default: "NUGET_USERNAME"
4582
+ :param trusted_publishing: (experimental) Use NuGet trusted publishing instead of API keys. Needs to be setup in NuGet.org.
3937
4583
 
3938
4584
  :deprecated: Use ``NugetPublishOptions`` instead.
3939
4585
 
@@ -3943,12 +4589,17 @@ class JsiiReleaseNuget(NugetPublishOptions):
3943
4589
  publish_tools = _Tools_75b93a2a(**publish_tools)
3944
4590
  if __debug__:
3945
4591
  type_hints = typing.get_type_hints(_typecheckingstub__14abe6d299c2354a8f22a08788f088aafaa8acf2b85b20f297416346274a9b96)
4592
+ check_type(argname="argument github_environment", value=github_environment, expected_type=type_hints["github_environment"])
3946
4593
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
3947
4594
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
3948
4595
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
3949
4596
  check_type(argname="argument nuget_api_key_secret", value=nuget_api_key_secret, expected_type=type_hints["nuget_api_key_secret"])
3950
4597
  check_type(argname="argument nuget_server", value=nuget_server, expected_type=type_hints["nuget_server"])
4598
+ check_type(argname="argument nuget_username_secret", value=nuget_username_secret, expected_type=type_hints["nuget_username_secret"])
4599
+ check_type(argname="argument trusted_publishing", value=trusted_publishing, expected_type=type_hints["trusted_publishing"])
3951
4600
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4601
+ if github_environment is not None:
4602
+ self._values["github_environment"] = github_environment
3952
4603
  if post_publish_steps is not None:
3953
4604
  self._values["post_publish_steps"] = post_publish_steps
3954
4605
  if pre_publish_steps is not None:
@@ -3959,6 +4610,26 @@ class JsiiReleaseNuget(NugetPublishOptions):
3959
4610
  self._values["nuget_api_key_secret"] = nuget_api_key_secret
3960
4611
  if nuget_server is not None:
3961
4612
  self._values["nuget_server"] = nuget_server
4613
+ if nuget_username_secret is not None:
4614
+ self._values["nuget_username_secret"] = nuget_username_secret
4615
+ if trusted_publishing is not None:
4616
+ self._values["trusted_publishing"] = trusted_publishing
4617
+
4618
+ @builtins.property
4619
+ def github_environment(self) -> typing.Optional[builtins.str]:
4620
+ '''(experimental) The GitHub Actions environment used for publishing.
4621
+
4622
+ This can be used to add an explicit approval step to the release
4623
+ or limit who can initiate a release through environment protection rules.
4624
+
4625
+ Set this to overwrite a package level publishing environment just for this artifact.
4626
+
4627
+ :default: - no environment used, unless set at the package level
4628
+
4629
+ :stability: experimental
4630
+ '''
4631
+ result = self._values.get("github_environment")
4632
+ return typing.cast(typing.Optional[builtins.str], result)
3962
4633
 
3963
4634
  @builtins.property
3964
4635
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
@@ -3976,7 +4647,7 @@ class JsiiReleaseNuget(NugetPublishOptions):
3976
4647
 
3977
4648
  @builtins.property
3978
4649
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
3979
- '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede.
4650
+ '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed.
3980
4651
 
3981
4652
  These steps are executed after ``dist/`` has been populated with the build
3982
4653
  output.
@@ -4019,6 +4690,31 @@ class JsiiReleaseNuget(NugetPublishOptions):
4019
4690
  result = self._values.get("nuget_server")
4020
4691
  return typing.cast(typing.Optional[builtins.str], result)
4021
4692
 
4693
+ @builtins.property
4694
+ def nuget_username_secret(self) -> typing.Optional[builtins.str]:
4695
+ '''(experimental) The NuGet.org username (profile name, not email address) for trusted publisher authentication.
4696
+
4697
+ Required when using trusted publishing.
4698
+
4699
+ :default: "NUGET_USERNAME"
4700
+
4701
+ :stability: experimental
4702
+ '''
4703
+ result = self._values.get("nuget_username_secret")
4704
+ return typing.cast(typing.Optional[builtins.str], result)
4705
+
4706
+ @builtins.property
4707
+ def trusted_publishing(self) -> typing.Optional[builtins.bool]:
4708
+ '''(experimental) Use NuGet trusted publishing instead of API keys.
4709
+
4710
+ Needs to be setup in NuGet.org.
4711
+
4712
+ :see: https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing
4713
+ :stability: experimental
4714
+ '''
4715
+ result = self._values.get("trusted_publishing")
4716
+ return typing.cast(typing.Optional[builtins.bool], result)
4717
+
4022
4718
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
4023
4719
  return isinstance(rhs, self.__class__) and rhs._values == self._values
4024
4720
 
@@ -4035,9 +4731,13 @@ class JsiiReleaseNuget(NugetPublishOptions):
4035
4731
  jsii_type="projen.release.JsiiReleasePyPi",
4036
4732
  jsii_struct_bases=[PyPiPublishOptions],
4037
4733
  name_mapping={
4734
+ "github_environment": "githubEnvironment",
4038
4735
  "post_publish_steps": "postPublishSteps",
4039
4736
  "pre_publish_steps": "prePublishSteps",
4040
4737
  "publish_tools": "publishTools",
4738
+ "attestations": "attestations",
4739
+ "code_artifact_options": "codeArtifactOptions",
4740
+ "trusted_publishing": "trustedPublishing",
4041
4741
  "twine_password_secret": "twinePasswordSecret",
4042
4742
  "twine_registry_url": "twineRegistryUrl",
4043
4743
  "twine_username_secret": "twineUsernameSecret",
@@ -4047,17 +4747,25 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4047
4747
  def __init__(
4048
4748
  self,
4049
4749
  *,
4750
+ github_environment: typing.Optional[builtins.str] = None,
4050
4751
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4051
4752
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4052
4753
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
4754
+ attestations: typing.Optional[builtins.bool] = None,
4755
+ code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
4756
+ trusted_publishing: typing.Optional[builtins.bool] = None,
4053
4757
  twine_password_secret: typing.Optional[builtins.str] = None,
4054
4758
  twine_registry_url: typing.Optional[builtins.str] = None,
4055
4759
  twine_username_secret: typing.Optional[builtins.str] = None,
4056
4760
  ) -> None:
4057
4761
  '''
4762
+ :param github_environment: (experimental) The GitHub Actions environment used for publishing. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. Set this to overwrite a package level publishing environment just for this artifact. Default: - no environment used, unless set at the package level
4058
4763
  :param post_publish_steps: (experimental) Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPostPublishingSteps``.
4059
- :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
4764
+ :param pre_publish_steps: (experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. These steps are executed after ``dist/`` has been populated with the build output. Note that when using this in ``publishToGitHubReleases`` this will override steps added via ``addGitHubPrePublishingSteps``.
4060
4765
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
4766
+ :param attestations: (experimental) Generate and publish cryptographic attestations for files uploaded to PyPI. Attestations provide package provenance and integrity an can be viewed on PyPI. They are only available when using a Trusted Publisher for publishing. Default: - enabled when using trusted publishing, otherwise not applicable
4767
+ :param code_artifact_options: (experimental) Options for publishing to AWS CodeArtifact. Default: - undefined
4768
+ :param trusted_publishing: (experimental) Use PyPI trusted publishing instead of tokens or username & password. Needs to be setup in PyPI.
4061
4769
  :param twine_password_secret: (experimental) The GitHub secret which contains PyPI password. Default: "TWINE_PASSWORD"
4062
4770
  :param twine_registry_url: (experimental) The registry url to use when releasing packages. Default: - twine default
4063
4771
  :param twine_username_secret: (experimental) The GitHub secret which contains PyPI user name. Default: "TWINE_USERNAME"
@@ -4068,21 +4776,35 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4068
4776
  '''
4069
4777
  if isinstance(publish_tools, dict):
4070
4778
  publish_tools = _Tools_75b93a2a(**publish_tools)
4779
+ if isinstance(code_artifact_options, dict):
4780
+ code_artifact_options = CodeArtifactOptions(**code_artifact_options)
4071
4781
  if __debug__:
4072
4782
  type_hints = typing.get_type_hints(_typecheckingstub__0fa7c01cc40634bf771011bf4e8ddb9e3be28efd1b3f15b5d0768a4e810d37bc)
4783
+ check_type(argname="argument github_environment", value=github_environment, expected_type=type_hints["github_environment"])
4073
4784
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
4074
4785
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
4075
4786
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
4787
+ check_type(argname="argument attestations", value=attestations, expected_type=type_hints["attestations"])
4788
+ check_type(argname="argument code_artifact_options", value=code_artifact_options, expected_type=type_hints["code_artifact_options"])
4789
+ check_type(argname="argument trusted_publishing", value=trusted_publishing, expected_type=type_hints["trusted_publishing"])
4076
4790
  check_type(argname="argument twine_password_secret", value=twine_password_secret, expected_type=type_hints["twine_password_secret"])
4077
4791
  check_type(argname="argument twine_registry_url", value=twine_registry_url, expected_type=type_hints["twine_registry_url"])
4078
4792
  check_type(argname="argument twine_username_secret", value=twine_username_secret, expected_type=type_hints["twine_username_secret"])
4079
4793
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4794
+ if github_environment is not None:
4795
+ self._values["github_environment"] = github_environment
4080
4796
  if post_publish_steps is not None:
4081
4797
  self._values["post_publish_steps"] = post_publish_steps
4082
4798
  if pre_publish_steps is not None:
4083
4799
  self._values["pre_publish_steps"] = pre_publish_steps
4084
4800
  if publish_tools is not None:
4085
4801
  self._values["publish_tools"] = publish_tools
4802
+ if attestations is not None:
4803
+ self._values["attestations"] = attestations
4804
+ if code_artifact_options is not None:
4805
+ self._values["code_artifact_options"] = code_artifact_options
4806
+ if trusted_publishing is not None:
4807
+ self._values["trusted_publishing"] = trusted_publishing
4086
4808
  if twine_password_secret is not None:
4087
4809
  self._values["twine_password_secret"] = twine_password_secret
4088
4810
  if twine_registry_url is not None:
@@ -4090,6 +4812,22 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4090
4812
  if twine_username_secret is not None:
4091
4813
  self._values["twine_username_secret"] = twine_username_secret
4092
4814
 
4815
+ @builtins.property
4816
+ def github_environment(self) -> typing.Optional[builtins.str]:
4817
+ '''(experimental) The GitHub Actions environment used for publishing.
4818
+
4819
+ This can be used to add an explicit approval step to the release
4820
+ or limit who can initiate a release through environment protection rules.
4821
+
4822
+ Set this to overwrite a package level publishing environment just for this artifact.
4823
+
4824
+ :default: - no environment used, unless set at the package level
4825
+
4826
+ :stability: experimental
4827
+ '''
4828
+ result = self._values.get("github_environment")
4829
+ return typing.cast(typing.Optional[builtins.str], result)
4830
+
4093
4831
  @builtins.property
4094
4832
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
4095
4833
  '''(experimental) Steps to execute after executing the publishing command.
@@ -4106,7 +4844,7 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4106
4844
 
4107
4845
  @builtins.property
4108
4846
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
4109
- '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede.
4847
+ '''(experimental) Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed.
4110
4848
 
4111
4849
  These steps are executed after ``dist/`` has been populated with the build
4112
4850
  output.
@@ -4129,6 +4867,44 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4129
4867
  result = self._values.get("publish_tools")
4130
4868
  return typing.cast(typing.Optional[_Tools_75b93a2a], result)
4131
4869
 
4870
+ @builtins.property
4871
+ def attestations(self) -> typing.Optional[builtins.bool]:
4872
+ '''(experimental) Generate and publish cryptographic attestations for files uploaded to PyPI.
4873
+
4874
+ Attestations provide package provenance and integrity an can be viewed on PyPI.
4875
+ They are only available when using a Trusted Publisher for publishing.
4876
+
4877
+ :default: - enabled when using trusted publishing, otherwise not applicable
4878
+
4879
+ :see: https://docs.pypi.org/attestations/producing-attestations/
4880
+ :stability: experimental
4881
+ '''
4882
+ result = self._values.get("attestations")
4883
+ return typing.cast(typing.Optional[builtins.bool], result)
4884
+
4885
+ @builtins.property
4886
+ def code_artifact_options(self) -> typing.Optional[CodeArtifactOptions]:
4887
+ '''(experimental) Options for publishing to AWS CodeArtifact.
4888
+
4889
+ :default: - undefined
4890
+
4891
+ :stability: experimental
4892
+ '''
4893
+ result = self._values.get("code_artifact_options")
4894
+ return typing.cast(typing.Optional[CodeArtifactOptions], result)
4895
+
4896
+ @builtins.property
4897
+ def trusted_publishing(self) -> typing.Optional[builtins.bool]:
4898
+ '''(experimental) Use PyPI trusted publishing instead of tokens or username & password.
4899
+
4900
+ Needs to be setup in PyPI.
4901
+
4902
+ :see: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
4903
+ :stability: experimental
4904
+ '''
4905
+ result = self._values.get("trusted_publishing")
4906
+ return typing.cast(typing.Optional[builtins.bool], result)
4907
+
4132
4908
  @builtins.property
4133
4909
  def twine_password_secret(self) -> typing.Optional[builtins.str]:
4134
4910
  '''(experimental) The GitHub secret which contains PyPI password.
@@ -4178,9 +4954,11 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4178
4954
  jsii_type="projen.release.ReleaseOptions",
4179
4955
  jsii_struct_bases=[ReleaseProjectOptions],
4180
4956
  name_mapping={
4957
+ "bump_package": "bumpPackage",
4181
4958
  "jsii_release_version": "jsiiReleaseVersion",
4182
4959
  "major_version": "majorVersion",
4183
4960
  "min_major_version": "minMajorVersion",
4961
+ "next_version_command": "nextVersionCommand",
4184
4962
  "npm_dist_tag": "npmDistTag",
4185
4963
  "post_build_steps": "postBuildSteps",
4186
4964
  "prerelease": "prerelease",
@@ -4188,12 +4966,14 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4188
4966
  "publish_tasks": "publishTasks",
4189
4967
  "releasable_commits": "releasableCommits",
4190
4968
  "release_branches": "releaseBranches",
4969
+ "release_environment": "releaseEnvironment",
4191
4970
  "release_every_commit": "releaseEveryCommit",
4192
4971
  "release_failure_issue": "releaseFailureIssue",
4193
4972
  "release_failure_issue_label": "releaseFailureIssueLabel",
4194
4973
  "release_schedule": "releaseSchedule",
4195
4974
  "release_tag_prefix": "releaseTagPrefix",
4196
4975
  "release_trigger": "releaseTrigger",
4976
+ "release_workflow_env": "releaseWorkflowEnv",
4197
4977
  "release_workflow_name": "releaseWorkflowName",
4198
4978
  "release_workflow_setup_steps": "releaseWorkflowSetupSteps",
4199
4979
  "versionrc_options": "versionrcOptions",
@@ -4202,9 +4982,10 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4202
4982
  "workflow_runs_on_group": "workflowRunsOnGroup",
4203
4983
  "artifacts_directory": "artifactsDirectory",
4204
4984
  "branch": "branch",
4205
- "task": "task",
4206
4985
  "version_file": "versionFile",
4207
4986
  "github_release": "githubRelease",
4987
+ "task": "task",
4988
+ "tasks": "tasks",
4208
4989
  "workflow_node_version": "workflowNodeVersion",
4209
4990
  "workflow_permissions": "workflowPermissions",
4210
4991
  },
@@ -4213,9 +4994,11 @@ class ReleaseOptions(ReleaseProjectOptions):
4213
4994
  def __init__(
4214
4995
  self,
4215
4996
  *,
4997
+ bump_package: typing.Optional[builtins.str] = None,
4216
4998
  jsii_release_version: typing.Optional[builtins.str] = None,
4217
4999
  major_version: typing.Optional[jsii.Number] = None,
4218
5000
  min_major_version: typing.Optional[jsii.Number] = None,
5001
+ next_version_command: typing.Optional[builtins.str] = None,
4219
5002
  npm_dist_tag: typing.Optional[builtins.str] = None,
4220
5003
  post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4221
5004
  prerelease: typing.Optional[builtins.str] = None,
@@ -4223,12 +5006,14 @@ class ReleaseOptions(ReleaseProjectOptions):
4223
5006
  publish_tasks: typing.Optional[builtins.bool] = None,
4224
5007
  releasable_commits: typing.Optional[_ReleasableCommits_d481ce10] = None,
4225
5008
  release_branches: typing.Optional[typing.Mapping[builtins.str, typing.Union[BranchOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
5009
+ release_environment: typing.Optional[builtins.str] = None,
4226
5010
  release_every_commit: typing.Optional[builtins.bool] = None,
4227
5011
  release_failure_issue: typing.Optional[builtins.bool] = None,
4228
5012
  release_failure_issue_label: typing.Optional[builtins.str] = None,
4229
5013
  release_schedule: typing.Optional[builtins.str] = None,
4230
5014
  release_tag_prefix: typing.Optional[builtins.str] = None,
4231
5015
  release_trigger: typing.Optional[ReleaseTrigger] = None,
5016
+ release_workflow_env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
4232
5017
  release_workflow_name: typing.Optional[builtins.str] = None,
4233
5018
  release_workflow_setup_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4234
5019
  versionrc_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
@@ -4237,17 +5022,20 @@ class ReleaseOptions(ReleaseProjectOptions):
4237
5022
  workflow_runs_on_group: typing.Optional[typing.Union[_GroupRunnerOptions_148c59c1, typing.Dict[builtins.str, typing.Any]]] = None,
4238
5023
  artifacts_directory: builtins.str,
4239
5024
  branch: builtins.str,
4240
- task: _Task_9fa875b6,
4241
5025
  version_file: builtins.str,
4242
5026
  github_release: typing.Optional[builtins.bool] = None,
5027
+ task: typing.Optional[_Task_9fa875b6] = None,
5028
+ tasks: typing.Optional[typing.Sequence[_Task_9fa875b6]] = None,
4243
5029
  workflow_node_version: typing.Optional[builtins.str] = None,
4244
5030
  workflow_permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
4245
5031
  ) -> None:
4246
5032
  '''(experimental) Options for ``Release``.
4247
5033
 
5034
+ :param bump_package: (experimental) The ``commit-and-tag-version`` compatible package used to bump the package version, as a dependency string. This can be any compatible package version, including the deprecated ``standard-version@9``. Default: - A recent version of "commit-and-tag-version"
4248
5035
  :param jsii_release_version: (experimental) Version requirement of ``publib`` which is used to publish modules to npm. Default: "latest"
4249
5036
  :param major_version: (experimental) Major version to release from the default branch. If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version. Default: - Major version is not enforced.
4250
5037
  :param min_major_version: (experimental) Minimal Major version to release. This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number. Can not be set together with ``majorVersion``. Default: - No minimum version is being enforced
5038
+ :param next_version_command: (experimental) A shell command to control the next version to release. If present, this shell command will be run before the bump is executed, and it determines what version to release. It will be executed in the following environment: - Working directory: the project directory. - ``$VERSION``: the current version. Looks like ``1.2.3``. - ``$LATEST_TAG``: the most recent tag. Looks like ``prefix-v1.2.3``, or may be unset. - ``$SUGGESTED_BUMP``: the suggested bump action based on commits. One of ``major|minor|patch|none``. The command should print one of the following to ``stdout``: - Nothing: the next version number will be determined based on commit history. - ``x.y.z``: the next version number will be ``x.y.z``. - ``major|minor|patch``: the next version number will be the current version number with the indicated component bumped. This setting cannot be specified together with ``minMajorVersion``; the invoked script can be used to achieve the effects of ``minMajorVersion``. Default: - The next version will be determined based on the commit history and project settings.
4251
5039
  :param npm_dist_tag: (experimental) The npmDistTag to use when publishing from the default branch. To set the npm dist-tag for release branches, set the ``npmDistTag`` property for each branch. Default: "latest"
4252
5040
  :param post_build_steps: (experimental) Steps to execute after build as part of the release workflow. Default: []
4253
5041
  :param prerelease: (experimental) Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). Default: - normal semantic versions
@@ -4255,24 +5043,27 @@ class ReleaseOptions(ReleaseProjectOptions):
4255
5043
  :param publish_tasks: (experimental) Define publishing tasks that can be executed manually as well as workflows. Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity. Default: false
4256
5044
  :param releasable_commits: (experimental) Find commits that should be considered releasable Used to decide if a release is required. Default: ReleasableCommits.everyCommit()
4257
5045
  :param release_branches: (experimental) Defines additional release branches. A workflow will be created for each release branch which will publish releases from commits in this branch. Each release branch *must* be assigned a major version number which is used to enforce that versions published from that branch always use that major version. If multiple branches are used, the ``majorVersion`` field must also be provided for the default branch. Default: - no additional branches are used for release. you can use ``addBranch()`` to add additional branches.
5046
+ :param release_environment: (experimental) The GitHub Actions environment used for the release. This can be used to add an explicit approval step to the release or limit who can initiate a release through environment protection rules. When multiple artifacts are released, the environment can be overwritten on a per artifact basis. Default: - no environment used, unless set at the artifact level
4258
5047
  :param release_every_commit: (deprecated) Automatically release new versions every commit to one of branches in ``releaseBranches``. Default: true
4259
5048
  :param release_failure_issue: (experimental) Create a github issue on every failed publishing task. Default: false
4260
5049
  :param release_failure_issue_label: (experimental) The label to apply to issues indicating publish failures. Only applies if ``releaseFailureIssue`` is true. Default: "failed-release"
4261
5050
  :param release_schedule: (deprecated) CRON schedule to trigger new releases. Default: - no scheduled releases
4262
5051
  :param release_tag_prefix: (experimental) Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix. Default: "v"
4263
5052
  :param release_trigger: (experimental) The release trigger to use. Default: - Continuous releases (``ReleaseTrigger.continuous()``)
5053
+ :param release_workflow_env: (experimental) Build environment variables for release workflows. Default: {}
4264
5054
  :param release_workflow_name: (experimental) The name of the default release workflow. Default: "release"
4265
5055
  :param release_workflow_setup_steps: (experimental) A set of workflow steps to execute in order to setup the workflow container.
4266
- :param versionrc_options: (experimental) Custom configuration used when creating changelog with standard-version package. Given values either append to default configuration or overwrite values in it. Default: - standard configuration applicable for GitHub repositories
5056
+ :param versionrc_options: (experimental) Custom configuration used when creating changelog with commit-and-tag-version package. Given values either append to default configuration or overwrite values in it. Default: - standard configuration applicable for GitHub repositories
4267
5057
  :param workflow_container_image: (experimental) Container image to use for GitHub workflows. Default: - default image
4268
5058
  :param workflow_runs_on: (experimental) Github Runner selection labels. Default: ["ubuntu-latest"]
4269
5059
  :param workflow_runs_on_group: (experimental) Github Runner Group selection options.
4270
5060
  :param artifacts_directory: (experimental) A directory which will contain build artifacts. Default: "dist"
4271
5061
  :param branch: (experimental) The default branch name to release from. Use ``majorVersion`` to restrict this branch to only publish releases with a specific major version. You can add additional branches using ``addBranch()``.
4272
- :param task: (experimental) The task to execute in order to create the release artifacts. Artifacts are expected to reside under ``artifactsDirectory`` (defaults to ``dist/``) once build is complete.
4273
5062
  :param version_file: (experimental) A name of a .json file to set the ``version`` field in after a bump.
4274
5063
  :param github_release: (experimental) Create a GitHub release for each release. Default: true
4275
- :param workflow_node_version: (experimental) Node version to setup in GitHub workflows if any node-based CLI utilities are needed. For example ``publib``, the CLI projen uses to publish releases, is an npm library. Default: 18.x
5064
+ :param task: (deprecated) The task to execute in order to create the release artifacts. Artifacts are expected to reside under ``artifactsDirectory`` (defaults to ``dist/``) once build is complete.
5065
+ :param tasks: (experimental) The tasks to execute in order to create the release artifacts. Artifacts are expected to reside under ``artifactsDirectory`` (defaults to ``dist/``) once build is complete.
5066
+ :param workflow_node_version: (experimental) Node version to setup in GitHub workflows if any node-based CLI utilities are needed. For example ``publib``, the CLI projen uses to publish releases, is an npm library. Default: "lts/*""
4276
5067
  :param workflow_permissions: (experimental) Permissions granted to the release workflow job. Default: ``{ contents: JobPermission.WRITE }``
4277
5068
 
4278
5069
  :stability: experimental
@@ -4283,9 +5074,11 @@ class ReleaseOptions(ReleaseProjectOptions):
4283
5074
  workflow_permissions = _JobPermissions_3b5b53dc(**workflow_permissions)
4284
5075
  if __debug__:
4285
5076
  type_hints = typing.get_type_hints(_typecheckingstub__abcbb9106f2fe858c4efa7a5934906e63b00b56fa33c47c5f910dac2a904f472)
5077
+ check_type(argname="argument bump_package", value=bump_package, expected_type=type_hints["bump_package"])
4286
5078
  check_type(argname="argument jsii_release_version", value=jsii_release_version, expected_type=type_hints["jsii_release_version"])
4287
5079
  check_type(argname="argument major_version", value=major_version, expected_type=type_hints["major_version"])
4288
5080
  check_type(argname="argument min_major_version", value=min_major_version, expected_type=type_hints["min_major_version"])
5081
+ check_type(argname="argument next_version_command", value=next_version_command, expected_type=type_hints["next_version_command"])
4289
5082
  check_type(argname="argument npm_dist_tag", value=npm_dist_tag, expected_type=type_hints["npm_dist_tag"])
4290
5083
  check_type(argname="argument post_build_steps", value=post_build_steps, expected_type=type_hints["post_build_steps"])
4291
5084
  check_type(argname="argument prerelease", value=prerelease, expected_type=type_hints["prerelease"])
@@ -4293,12 +5086,14 @@ class ReleaseOptions(ReleaseProjectOptions):
4293
5086
  check_type(argname="argument publish_tasks", value=publish_tasks, expected_type=type_hints["publish_tasks"])
4294
5087
  check_type(argname="argument releasable_commits", value=releasable_commits, expected_type=type_hints["releasable_commits"])
4295
5088
  check_type(argname="argument release_branches", value=release_branches, expected_type=type_hints["release_branches"])
5089
+ check_type(argname="argument release_environment", value=release_environment, expected_type=type_hints["release_environment"])
4296
5090
  check_type(argname="argument release_every_commit", value=release_every_commit, expected_type=type_hints["release_every_commit"])
4297
5091
  check_type(argname="argument release_failure_issue", value=release_failure_issue, expected_type=type_hints["release_failure_issue"])
4298
5092
  check_type(argname="argument release_failure_issue_label", value=release_failure_issue_label, expected_type=type_hints["release_failure_issue_label"])
4299
5093
  check_type(argname="argument release_schedule", value=release_schedule, expected_type=type_hints["release_schedule"])
4300
5094
  check_type(argname="argument release_tag_prefix", value=release_tag_prefix, expected_type=type_hints["release_tag_prefix"])
4301
5095
  check_type(argname="argument release_trigger", value=release_trigger, expected_type=type_hints["release_trigger"])
5096
+ check_type(argname="argument release_workflow_env", value=release_workflow_env, expected_type=type_hints["release_workflow_env"])
4302
5097
  check_type(argname="argument release_workflow_name", value=release_workflow_name, expected_type=type_hints["release_workflow_name"])
4303
5098
  check_type(argname="argument release_workflow_setup_steps", value=release_workflow_setup_steps, expected_type=type_hints["release_workflow_setup_steps"])
4304
5099
  check_type(argname="argument versionrc_options", value=versionrc_options, expected_type=type_hints["versionrc_options"])
@@ -4307,23 +5102,27 @@ class ReleaseOptions(ReleaseProjectOptions):
4307
5102
  check_type(argname="argument workflow_runs_on_group", value=workflow_runs_on_group, expected_type=type_hints["workflow_runs_on_group"])
4308
5103
  check_type(argname="argument artifacts_directory", value=artifacts_directory, expected_type=type_hints["artifacts_directory"])
4309
5104
  check_type(argname="argument branch", value=branch, expected_type=type_hints["branch"])
4310
- check_type(argname="argument task", value=task, expected_type=type_hints["task"])
4311
5105
  check_type(argname="argument version_file", value=version_file, expected_type=type_hints["version_file"])
4312
5106
  check_type(argname="argument github_release", value=github_release, expected_type=type_hints["github_release"])
5107
+ check_type(argname="argument task", value=task, expected_type=type_hints["task"])
5108
+ check_type(argname="argument tasks", value=tasks, expected_type=type_hints["tasks"])
4313
5109
  check_type(argname="argument workflow_node_version", value=workflow_node_version, expected_type=type_hints["workflow_node_version"])
4314
5110
  check_type(argname="argument workflow_permissions", value=workflow_permissions, expected_type=type_hints["workflow_permissions"])
4315
5111
  self._values: typing.Dict[builtins.str, typing.Any] = {
4316
5112
  "artifacts_directory": artifacts_directory,
4317
5113
  "branch": branch,
4318
- "task": task,
4319
5114
  "version_file": version_file,
4320
5115
  }
5116
+ if bump_package is not None:
5117
+ self._values["bump_package"] = bump_package
4321
5118
  if jsii_release_version is not None:
4322
5119
  self._values["jsii_release_version"] = jsii_release_version
4323
5120
  if major_version is not None:
4324
5121
  self._values["major_version"] = major_version
4325
5122
  if min_major_version is not None:
4326
5123
  self._values["min_major_version"] = min_major_version
5124
+ if next_version_command is not None:
5125
+ self._values["next_version_command"] = next_version_command
4327
5126
  if npm_dist_tag is not None:
4328
5127
  self._values["npm_dist_tag"] = npm_dist_tag
4329
5128
  if post_build_steps is not None:
@@ -4338,6 +5137,8 @@ class ReleaseOptions(ReleaseProjectOptions):
4338
5137
  self._values["releasable_commits"] = releasable_commits
4339
5138
  if release_branches is not None:
4340
5139
  self._values["release_branches"] = release_branches
5140
+ if release_environment is not None:
5141
+ self._values["release_environment"] = release_environment
4341
5142
  if release_every_commit is not None:
4342
5143
  self._values["release_every_commit"] = release_every_commit
4343
5144
  if release_failure_issue is not None:
@@ -4350,6 +5151,8 @@ class ReleaseOptions(ReleaseProjectOptions):
4350
5151
  self._values["release_tag_prefix"] = release_tag_prefix
4351
5152
  if release_trigger is not None:
4352
5153
  self._values["release_trigger"] = release_trigger
5154
+ if release_workflow_env is not None:
5155
+ self._values["release_workflow_env"] = release_workflow_env
4353
5156
  if release_workflow_name is not None:
4354
5157
  self._values["release_workflow_name"] = release_workflow_name
4355
5158
  if release_workflow_setup_steps is not None:
@@ -4364,11 +5167,28 @@ class ReleaseOptions(ReleaseProjectOptions):
4364
5167
  self._values["workflow_runs_on_group"] = workflow_runs_on_group
4365
5168
  if github_release is not None:
4366
5169
  self._values["github_release"] = github_release
5170
+ if task is not None:
5171
+ self._values["task"] = task
5172
+ if tasks is not None:
5173
+ self._values["tasks"] = tasks
4367
5174
  if workflow_node_version is not None:
4368
5175
  self._values["workflow_node_version"] = workflow_node_version
4369
5176
  if workflow_permissions is not None:
4370
5177
  self._values["workflow_permissions"] = workflow_permissions
4371
5178
 
5179
+ @builtins.property
5180
+ def bump_package(self) -> typing.Optional[builtins.str]:
5181
+ '''(experimental) The ``commit-and-tag-version`` compatible package used to bump the package version, as a dependency string.
5182
+
5183
+ This can be any compatible package version, including the deprecated ``standard-version@9``.
5184
+
5185
+ :default: - A recent version of "commit-and-tag-version"
5186
+
5187
+ :stability: experimental
5188
+ '''
5189
+ result = self._values.get("bump_package")
5190
+ return typing.cast(typing.Optional[builtins.str], result)
5191
+
4372
5192
  @builtins.property
4373
5193
  def jsii_release_version(self) -> typing.Optional[builtins.str]:
4374
5194
  '''(experimental) Version requirement of ``publib`` which is used to publish modules to npm.
@@ -4410,6 +5230,36 @@ class ReleaseOptions(ReleaseProjectOptions):
4410
5230
  result = self._values.get("min_major_version")
4411
5231
  return typing.cast(typing.Optional[jsii.Number], result)
4412
5232
 
5233
+ @builtins.property
5234
+ def next_version_command(self) -> typing.Optional[builtins.str]:
5235
+ '''(experimental) A shell command to control the next version to release.
5236
+
5237
+ If present, this shell command will be run before the bump is executed, and
5238
+ it determines what version to release. It will be executed in the following
5239
+ environment:
5240
+
5241
+ - Working directory: the project directory.
5242
+ - ``$VERSION``: the current version. Looks like ``1.2.3``.
5243
+ - ``$LATEST_TAG``: the most recent tag. Looks like ``prefix-v1.2.3``, or may be unset.
5244
+ - ``$SUGGESTED_BUMP``: the suggested bump action based on commits. One of ``major|minor|patch|none``.
5245
+
5246
+ The command should print one of the following to ``stdout``:
5247
+
5248
+ - Nothing: the next version number will be determined based on commit history.
5249
+ - ``x.y.z``: the next version number will be ``x.y.z``.
5250
+ - ``major|minor|patch``: the next version number will be the current version number
5251
+ with the indicated component bumped.
5252
+
5253
+ This setting cannot be specified together with ``minMajorVersion``; the invoked
5254
+ script can be used to achieve the effects of ``minMajorVersion``.
5255
+
5256
+ :default: - The next version will be determined based on the commit history and project settings.
5257
+
5258
+ :stability: experimental
5259
+ '''
5260
+ result = self._values.get("next_version_command")
5261
+ return typing.cast(typing.Optional[builtins.str], result)
5262
+
4413
5263
  @builtins.property
4414
5264
  def npm_dist_tag(self) -> typing.Optional[builtins.str]:
4415
5265
  '''(experimental) The npmDistTag to use when publishing from the default branch.
@@ -4505,6 +5355,23 @@ class ReleaseOptions(ReleaseProjectOptions):
4505
5355
  result = self._values.get("release_branches")
4506
5356
  return typing.cast(typing.Optional[typing.Mapping[builtins.str, BranchOptions]], result)
4507
5357
 
5358
+ @builtins.property
5359
+ def release_environment(self) -> typing.Optional[builtins.str]:
5360
+ '''(experimental) The GitHub Actions environment used for the release.
5361
+
5362
+ This can be used to add an explicit approval step to the release
5363
+ or limit who can initiate a release through environment protection rules.
5364
+
5365
+ When multiple artifacts are released, the environment can be overwritten
5366
+ on a per artifact basis.
5367
+
5368
+ :default: - no environment used, unless set at the artifact level
5369
+
5370
+ :stability: experimental
5371
+ '''
5372
+ result = self._values.get("release_environment")
5373
+ return typing.cast(typing.Optional[builtins.str], result)
5374
+
4508
5375
  @builtins.property
4509
5376
  def release_every_commit(self) -> typing.Optional[builtins.bool]:
4510
5377
  '''(deprecated) Automatically release new versions every commit to one of branches in ``releaseBranches``.
@@ -4582,6 +5449,19 @@ class ReleaseOptions(ReleaseProjectOptions):
4582
5449
  result = self._values.get("release_trigger")
4583
5450
  return typing.cast(typing.Optional[ReleaseTrigger], result)
4584
5451
 
5452
+ @builtins.property
5453
+ def release_workflow_env(
5454
+ self,
5455
+ ) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
5456
+ '''(experimental) Build environment variables for release workflows.
5457
+
5458
+ :default: {}
5459
+
5460
+ :stability: experimental
5461
+ '''
5462
+ result = self._values.get("release_workflow_env")
5463
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
5464
+
4585
5465
  @builtins.property
4586
5466
  def release_workflow_name(self) -> typing.Optional[builtins.str]:
4587
5467
  '''(experimental) The name of the default release workflow.
@@ -4608,7 +5488,7 @@ class ReleaseOptions(ReleaseProjectOptions):
4608
5488
  def versionrc_options(
4609
5489
  self,
4610
5490
  ) -> typing.Optional[typing.Mapping[builtins.str, typing.Any]]:
4611
- '''(experimental) Custom configuration used when creating changelog with standard-version package.
5491
+ '''(experimental) Custom configuration used when creating changelog with commit-and-tag-version package.
4612
5492
 
4613
5493
  Given values either append to default configuration or overwrite values in it.
4614
5494
 
@@ -4681,20 +5561,6 @@ class ReleaseOptions(ReleaseProjectOptions):
4681
5561
  assert result is not None, "Required property 'branch' is missing"
4682
5562
  return typing.cast(builtins.str, result)
4683
5563
 
4684
- @builtins.property
4685
- def task(self) -> _Task_9fa875b6:
4686
- '''(experimental) The task to execute in order to create the release artifacts.
4687
-
4688
- Artifacts are
4689
- expected to reside under ``artifactsDirectory`` (defaults to ``dist/``) once
4690
- build is complete.
4691
-
4692
- :stability: experimental
4693
- '''
4694
- result = self._values.get("task")
4695
- assert result is not None, "Required property 'task' is missing"
4696
- return typing.cast(_Task_9fa875b6, result)
4697
-
4698
5564
  @builtins.property
4699
5565
  def version_file(self) -> builtins.str:
4700
5566
  '''(experimental) A name of a .json file to set the ``version`` field in after a bump.
@@ -4720,6 +5586,34 @@ class ReleaseOptions(ReleaseProjectOptions):
4720
5586
  result = self._values.get("github_release")
4721
5587
  return typing.cast(typing.Optional[builtins.bool], result)
4722
5588
 
5589
+ @builtins.property
5590
+ def task(self) -> typing.Optional[_Task_9fa875b6]:
5591
+ '''(deprecated) The task to execute in order to create the release artifacts.
5592
+
5593
+ Artifacts are
5594
+ expected to reside under ``artifactsDirectory`` (defaults to ``dist/``) once
5595
+ build is complete.
5596
+
5597
+ :deprecated: Use ``tasks`` instead
5598
+
5599
+ :stability: deprecated
5600
+ '''
5601
+ result = self._values.get("task")
5602
+ return typing.cast(typing.Optional[_Task_9fa875b6], result)
5603
+
5604
+ @builtins.property
5605
+ def tasks(self) -> typing.Optional[typing.List[_Task_9fa875b6]]:
5606
+ '''(experimental) The tasks to execute in order to create the release artifacts.
5607
+
5608
+ Artifacts are
5609
+ expected to reside under ``artifactsDirectory`` (defaults to ``dist/``) once
5610
+ build is complete.
5611
+
5612
+ :stability: experimental
5613
+ '''
5614
+ result = self._values.get("tasks")
5615
+ return typing.cast(typing.Optional[typing.List[_Task_9fa875b6]], result)
5616
+
4723
5617
  @builtins.property
4724
5618
  def workflow_node_version(self) -> typing.Optional[builtins.str]:
4725
5619
  '''(experimental) Node version to setup in GitHub workflows if any node-based CLI utilities are needed.
@@ -4727,7 +5621,7 @@ class ReleaseOptions(ReleaseProjectOptions):
4727
5621
  For example ``publib``, the CLI projen uses to publish releases,
4728
5622
  is an npm library.
4729
5623
 
4730
- :default: 18.x
5624
+ :default: "lts/*""
4731
5625
 
4732
5626
  :stability: experimental
4733
5627
  '''
@@ -4762,6 +5656,7 @@ __all__ = [
4762
5656
  "CodeArtifactAuthProvider",
4763
5657
  "CodeArtifactOptions",
4764
5658
  "CommonPublishOptions",
5659
+ "ContinuousReleaseOptions",
4765
5660
  "GitHubReleasesPublishOptions",
4766
5661
  "GitPublishOptions",
4767
5662
  "GoPublishOptions",
@@ -4789,6 +5684,7 @@ publication.publish()
4789
5684
  def _typecheckingstub__6f62eb98000deee3820f046309b2262c5063c0cb9581232fd1a44731f86986d7(
4790
5685
  *,
4791
5686
  major_version: jsii.Number,
5687
+ environment: typing.Optional[builtins.str] = None,
4792
5688
  min_major_version: typing.Optional[jsii.Number] = None,
4793
5689
  minor_version: typing.Optional[jsii.Number] = None,
4794
5690
  npm_dist_tag: typing.Optional[builtins.str] = None,
@@ -4811,6 +5707,7 @@ def _typecheckingstub__9a328fe64db40633fedae889a7376e6885e1983f57d171d4f4ef85af6
4811
5707
 
4812
5708
  def _typecheckingstub__9603f09b67279d5ef3dc921367168d873983210161b1d6382c369d0b9ec13b0a(
4813
5709
  *,
5710
+ github_environment: typing.Optional[builtins.str] = None,
4814
5711
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4815
5712
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4816
5713
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -4818,8 +5715,16 @@ def _typecheckingstub__9603f09b67279d5ef3dc921367168d873983210161b1d6382c369d0b9
4818
5715
  """Type checking stubs"""
4819
5716
  pass
4820
5717
 
5718
+ def _typecheckingstub__95b36779f92c5190c3ac9d8a636a537bfe6ebc844a55942ee5dfc0a9656d6192(
5719
+ *,
5720
+ paths: typing.Optional[typing.Sequence[builtins.str]] = None,
5721
+ ) -> None:
5722
+ """Type checking stubs"""
5723
+ pass
5724
+
4821
5725
  def _typecheckingstub__c7008ba35b00dedc375d87db7a317e8f077475b6a4e334303337c92bb77171fb(
4822
5726
  *,
5727
+ github_environment: typing.Optional[builtins.str] = None,
4823
5728
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4824
5729
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4825
5730
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -4844,13 +5749,13 @@ def _typecheckingstub__d5537e1435c9eea568279fa140de950e1b7275db307b3741959861863
4844
5749
 
4845
5750
  def _typecheckingstub__81a5b8a4f17bcea99089b42477d5b778fd3a9066d3d1126736ccf21a9c44bfbc(
4846
5751
  *,
5752
+ github_environment: typing.Optional[builtins.str] = None,
4847
5753
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4848
5754
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4849
5755
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
4850
5756
  git_branch: typing.Optional[builtins.str] = None,
4851
5757
  git_commit_message: typing.Optional[builtins.str] = None,
4852
5758
  github_deploy_key_secret: typing.Optional[builtins.str] = None,
4853
- github_repo: typing.Optional[builtins.str] = None,
4854
5759
  github_token_secret: typing.Optional[builtins.str] = None,
4855
5760
  github_use_ssh: typing.Optional[builtins.bool] = None,
4856
5761
  git_user_email: typing.Optional[builtins.str] = None,
@@ -4861,13 +5766,13 @@ def _typecheckingstub__81a5b8a4f17bcea99089b42477d5b778fd3a9066d3d1126736ccf21a9
4861
5766
 
4862
5767
  def _typecheckingstub__44bae65cd3313afa37ada6dbaab99141ff7744458e985bc9c53faa021220e167(
4863
5768
  *,
5769
+ github_environment: typing.Optional[builtins.str] = None,
4864
5770
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4865
5771
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4866
5772
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
4867
5773
  git_branch: typing.Optional[builtins.str] = None,
4868
5774
  git_commit_message: typing.Optional[builtins.str] = None,
4869
5775
  github_deploy_key_secret: typing.Optional[builtins.str] = None,
4870
- github_repo: typing.Optional[builtins.str] = None,
4871
5776
  github_token_secret: typing.Optional[builtins.str] = None,
4872
5777
  github_use_ssh: typing.Optional[builtins.bool] = None,
4873
5778
  git_user_email: typing.Optional[builtins.str] = None,
@@ -4887,6 +5792,7 @@ def _typecheckingstub__2492d83058b766179e85fd785d08928e38b53ce70b0f2dc9a1c5edccb
4887
5792
 
4888
5793
  def _typecheckingstub__da2d55bfa47dd9e6869b7f55b573dea54539ab2e9b833766e4140d6d4c4c3d7e(
4889
5794
  *,
5795
+ github_environment: typing.Optional[builtins.str] = None,
4890
5796
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4891
5797
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4892
5798
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -4904,24 +5810,30 @@ def _typecheckingstub__da2d55bfa47dd9e6869b7f55b573dea54539ab2e9b833766e4140d6d4
4904
5810
 
4905
5811
  def _typecheckingstub__458289050585e6e895f9ee709ee4e102166b0f71e3c8b2a0617efa2d24e990fb(
4906
5812
  *,
5813
+ github_environment: typing.Optional[builtins.str] = None,
4907
5814
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4908
5815
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4909
5816
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
4910
5817
  code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
4911
5818
  dist_tag: typing.Optional[builtins.str] = None,
5819
+ npm_provenance: typing.Optional[builtins.bool] = None,
4912
5820
  npm_token_secret: typing.Optional[builtins.str] = None,
4913
5821
  registry: typing.Optional[builtins.str] = None,
5822
+ trusted_publishing: typing.Optional[builtins.bool] = None,
4914
5823
  ) -> None:
4915
5824
  """Type checking stubs"""
4916
5825
  pass
4917
5826
 
4918
5827
  def _typecheckingstub__584d4125e43e970396e9062b357de30ef32a6d1b30bd3a0f00fc7db041ea0bec(
4919
5828
  *,
5829
+ github_environment: typing.Optional[builtins.str] = None,
4920
5830
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4921
5831
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4922
5832
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
4923
5833
  nuget_api_key_secret: typing.Optional[builtins.str] = None,
4924
5834
  nuget_server: typing.Optional[builtins.str] = None,
5835
+ nuget_username_secret: typing.Optional[builtins.str] = None,
5836
+ trusted_publishing: typing.Optional[builtins.bool] = None,
4925
5837
  ) -> None:
4926
5838
  """Type checking stubs"""
4927
5839
  pass
@@ -4979,9 +5891,13 @@ def _typecheckingstub__4e430972b008e5968049196f964ee9dfa036c68b2195f125119bc2629
4979
5891
 
4980
5892
  def _typecheckingstub__f90cd44def59be822b686bcd759d7f0a910b9936ca8acc0ef3e69cda5ddc21d2(
4981
5893
  *,
5894
+ github_environment: typing.Optional[builtins.str] = None,
4982
5895
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4983
5896
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4984
5897
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
5898
+ attestations: typing.Optional[builtins.bool] = None,
5899
+ code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
5900
+ trusted_publishing: typing.Optional[builtins.bool] = None,
4985
5901
  twine_password_secret: typing.Optional[builtins.str] = None,
4986
5902
  twine_registry_url: typing.Optional[builtins.str] = None,
4987
5903
  twine_username_secret: typing.Optional[builtins.str] = None,
@@ -4994,14 +5910,17 @@ def _typecheckingstub__b447ecb34d36869391ee159467e6c78b74da704722d4c6a517e05bbae
4994
5910
  *,
4995
5911
  artifacts_directory: builtins.str,
4996
5912
  branch: builtins.str,
4997
- task: _Task_9fa875b6,
4998
5913
  version_file: builtins.str,
4999
5914
  github_release: typing.Optional[builtins.bool] = None,
5915
+ task: typing.Optional[_Task_9fa875b6] = None,
5916
+ tasks: typing.Optional[typing.Sequence[_Task_9fa875b6]] = None,
5000
5917
  workflow_node_version: typing.Optional[builtins.str] = None,
5001
5918
  workflow_permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
5919
+ bump_package: typing.Optional[builtins.str] = None,
5002
5920
  jsii_release_version: typing.Optional[builtins.str] = None,
5003
5921
  major_version: typing.Optional[jsii.Number] = None,
5004
5922
  min_major_version: typing.Optional[jsii.Number] = None,
5923
+ next_version_command: typing.Optional[builtins.str] = None,
5005
5924
  npm_dist_tag: typing.Optional[builtins.str] = None,
5006
5925
  post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5007
5926
  prerelease: typing.Optional[builtins.str] = None,
@@ -5009,12 +5928,14 @@ def _typecheckingstub__b447ecb34d36869391ee159467e6c78b74da704722d4c6a517e05bbae
5009
5928
  publish_tasks: typing.Optional[builtins.bool] = None,
5010
5929
  releasable_commits: typing.Optional[_ReleasableCommits_d481ce10] = None,
5011
5930
  release_branches: typing.Optional[typing.Mapping[builtins.str, typing.Union[BranchOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
5931
+ release_environment: typing.Optional[builtins.str] = None,
5012
5932
  release_every_commit: typing.Optional[builtins.bool] = None,
5013
5933
  release_failure_issue: typing.Optional[builtins.bool] = None,
5014
5934
  release_failure_issue_label: typing.Optional[builtins.str] = None,
5015
5935
  release_schedule: typing.Optional[builtins.str] = None,
5016
5936
  release_tag_prefix: typing.Optional[builtins.str] = None,
5017
5937
  release_trigger: typing.Optional[ReleaseTrigger] = None,
5938
+ release_workflow_env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
5018
5939
  release_workflow_name: typing.Optional[builtins.str] = None,
5019
5940
  release_workflow_setup_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5020
5941
  versionrc_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
@@ -5035,6 +5956,7 @@ def _typecheckingstub__e0f66d9106b15a88644bb5efb62c4d4d18bb7c7b73bb22b904010a8a6
5035
5956
  branch: builtins.str,
5036
5957
  *,
5037
5958
  major_version: jsii.Number,
5959
+ environment: typing.Optional[builtins.str] = None,
5038
5960
  min_major_version: typing.Optional[jsii.Number] = None,
5039
5961
  minor_version: typing.Optional[jsii.Number] = None,
5040
5962
  npm_dist_tag: typing.Optional[builtins.str] = None,
@@ -5053,9 +5975,11 @@ def _typecheckingstub__e8df2839c98abec4e8a1e84ad0fc953b4051cdf361a30544804281bc9
5053
5975
 
5054
5976
  def _typecheckingstub__cc5e99254de9f29d2ac3b86e193164816e1ed36e491e602128e7d16fb86aa377(
5055
5977
  *,
5978
+ bump_package: typing.Optional[builtins.str] = None,
5056
5979
  jsii_release_version: typing.Optional[builtins.str] = None,
5057
5980
  major_version: typing.Optional[jsii.Number] = None,
5058
5981
  min_major_version: typing.Optional[jsii.Number] = None,
5982
+ next_version_command: typing.Optional[builtins.str] = None,
5059
5983
  npm_dist_tag: typing.Optional[builtins.str] = None,
5060
5984
  post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5061
5985
  prerelease: typing.Optional[builtins.str] = None,
@@ -5063,12 +5987,14 @@ def _typecheckingstub__cc5e99254de9f29d2ac3b86e193164816e1ed36e491e602128e7d16fb
5063
5987
  publish_tasks: typing.Optional[builtins.bool] = None,
5064
5988
  releasable_commits: typing.Optional[_ReleasableCommits_d481ce10] = None,
5065
5989
  release_branches: typing.Optional[typing.Mapping[builtins.str, typing.Union[BranchOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
5990
+ release_environment: typing.Optional[builtins.str] = None,
5066
5991
  release_every_commit: typing.Optional[builtins.bool] = None,
5067
5992
  release_failure_issue: typing.Optional[builtins.bool] = None,
5068
5993
  release_failure_issue_label: typing.Optional[builtins.str] = None,
5069
5994
  release_schedule: typing.Optional[builtins.str] = None,
5070
5995
  release_tag_prefix: typing.Optional[builtins.str] = None,
5071
5996
  release_trigger: typing.Optional[ReleaseTrigger] = None,
5997
+ release_workflow_env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
5072
5998
  release_workflow_name: typing.Optional[builtins.str] = None,
5073
5999
  release_workflow_setup_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5074
6000
  versionrc_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
@@ -5088,6 +6014,7 @@ def _typecheckingstub__629cc7488dbd6e87168962d964694e088625a8e208d09e45c120eac7e
5088
6014
 
5089
6015
  def _typecheckingstub__370b478ebba8352e12c41a67b57d5954055dba8a6ceae59144e72607fdc6df41(
5090
6016
  *,
6017
+ github_environment: typing.Optional[builtins.str] = None,
5091
6018
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5092
6019
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5093
6020
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -5105,33 +6032,43 @@ def _typecheckingstub__370b478ebba8352e12c41a67b57d5954055dba8a6ceae59144e72607f
5105
6032
 
5106
6033
  def _typecheckingstub__a34680d3cf9e2cc6374987796717402a524a0bb377e9172f0707da67450b3239(
5107
6034
  *,
6035
+ github_environment: typing.Optional[builtins.str] = None,
5108
6036
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5109
6037
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5110
6038
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
5111
6039
  code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
5112
6040
  dist_tag: typing.Optional[builtins.str] = None,
6041
+ npm_provenance: typing.Optional[builtins.bool] = None,
5113
6042
  npm_token_secret: typing.Optional[builtins.str] = None,
5114
6043
  registry: typing.Optional[builtins.str] = None,
6044
+ trusted_publishing: typing.Optional[builtins.bool] = None,
5115
6045
  ) -> None:
5116
6046
  """Type checking stubs"""
5117
6047
  pass
5118
6048
 
5119
6049
  def _typecheckingstub__14abe6d299c2354a8f22a08788f088aafaa8acf2b85b20f297416346274a9b96(
5120
6050
  *,
6051
+ github_environment: typing.Optional[builtins.str] = None,
5121
6052
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5122
6053
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5123
6054
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
5124
6055
  nuget_api_key_secret: typing.Optional[builtins.str] = None,
5125
6056
  nuget_server: typing.Optional[builtins.str] = None,
6057
+ nuget_username_secret: typing.Optional[builtins.str] = None,
6058
+ trusted_publishing: typing.Optional[builtins.bool] = None,
5126
6059
  ) -> None:
5127
6060
  """Type checking stubs"""
5128
6061
  pass
5129
6062
 
5130
6063
  def _typecheckingstub__0fa7c01cc40634bf771011bf4e8ddb9e3be28efd1b3f15b5d0768a4e810d37bc(
5131
6064
  *,
6065
+ github_environment: typing.Optional[builtins.str] = None,
5132
6066
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5133
6067
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5134
6068
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
6069
+ attestations: typing.Optional[builtins.bool] = None,
6070
+ code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
6071
+ trusted_publishing: typing.Optional[builtins.bool] = None,
5135
6072
  twine_password_secret: typing.Optional[builtins.str] = None,
5136
6073
  twine_registry_url: typing.Optional[builtins.str] = None,
5137
6074
  twine_username_secret: typing.Optional[builtins.str] = None,
@@ -5141,9 +6078,11 @@ def _typecheckingstub__0fa7c01cc40634bf771011bf4e8ddb9e3be28efd1b3f15b5d0768a4e8
5141
6078
 
5142
6079
  def _typecheckingstub__abcbb9106f2fe858c4efa7a5934906e63b00b56fa33c47c5f910dac2a904f472(
5143
6080
  *,
6081
+ bump_package: typing.Optional[builtins.str] = None,
5144
6082
  jsii_release_version: typing.Optional[builtins.str] = None,
5145
6083
  major_version: typing.Optional[jsii.Number] = None,
5146
6084
  min_major_version: typing.Optional[jsii.Number] = None,
6085
+ next_version_command: typing.Optional[builtins.str] = None,
5147
6086
  npm_dist_tag: typing.Optional[builtins.str] = None,
5148
6087
  post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5149
6088
  prerelease: typing.Optional[builtins.str] = None,
@@ -5151,12 +6090,14 @@ def _typecheckingstub__abcbb9106f2fe858c4efa7a5934906e63b00b56fa33c47c5f910dac2a
5151
6090
  publish_tasks: typing.Optional[builtins.bool] = None,
5152
6091
  releasable_commits: typing.Optional[_ReleasableCommits_d481ce10] = None,
5153
6092
  release_branches: typing.Optional[typing.Mapping[builtins.str, typing.Union[BranchOptions, typing.Dict[builtins.str, typing.Any]]]] = None,
6093
+ release_environment: typing.Optional[builtins.str] = None,
5154
6094
  release_every_commit: typing.Optional[builtins.bool] = None,
5155
6095
  release_failure_issue: typing.Optional[builtins.bool] = None,
5156
6096
  release_failure_issue_label: typing.Optional[builtins.str] = None,
5157
6097
  release_schedule: typing.Optional[builtins.str] = None,
5158
6098
  release_tag_prefix: typing.Optional[builtins.str] = None,
5159
6099
  release_trigger: typing.Optional[ReleaseTrigger] = None,
6100
+ release_workflow_env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
5160
6101
  release_workflow_name: typing.Optional[builtins.str] = None,
5161
6102
  release_workflow_setup_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5162
6103
  versionrc_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
@@ -5165,9 +6106,10 @@ def _typecheckingstub__abcbb9106f2fe858c4efa7a5934906e63b00b56fa33c47c5f910dac2a
5165
6106
  workflow_runs_on_group: typing.Optional[typing.Union[_GroupRunnerOptions_148c59c1, typing.Dict[builtins.str, typing.Any]]] = None,
5166
6107
  artifacts_directory: builtins.str,
5167
6108
  branch: builtins.str,
5168
- task: _Task_9fa875b6,
5169
6109
  version_file: builtins.str,
5170
6110
  github_release: typing.Optional[builtins.bool] = None,
6111
+ task: typing.Optional[_Task_9fa875b6] = None,
6112
+ tasks: typing.Optional[typing.Sequence[_Task_9fa875b6]] = None,
5171
6113
  workflow_node_version: typing.Optional[builtins.str] = None,
5172
6114
  workflow_permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
5173
6115
  ) -> None: