projen 0.81.17__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.
@@ -11,7 +11,22 @@ import jsii
11
11
  import publication
12
12
  import typing_extensions
13
13
 
14
- 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
15
30
 
16
31
  from .._jsii import *
17
32
 
@@ -36,6 +51,7 @@ from ..github.workflows import (
36
51
  jsii_struct_bases=[],
37
52
  name_mapping={
38
53
  "major_version": "majorVersion",
54
+ "environment": "environment",
39
55
  "min_major_version": "minMajorVersion",
40
56
  "minor_version": "minorVersion",
41
57
  "npm_dist_tag": "npmDistTag",
@@ -49,6 +65,7 @@ class BranchOptions:
49
65
  self,
50
66
  *,
51
67
  major_version: jsii.Number,
68
+ environment: typing.Optional[builtins.str] = None,
52
69
  min_major_version: typing.Optional[jsii.Number] = None,
53
70
  minor_version: typing.Optional[jsii.Number] = None,
54
71
  npm_dist_tag: typing.Optional[builtins.str] = None,
@@ -59,6 +76,7 @@ class BranchOptions:
59
76
  '''(experimental) Options for a release branch.
60
77
 
61
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
62
80
  :param min_major_version: (experimental) The minimum major version to release.
63
81
  :param minor_version: (experimental) The minor versions released from this branch.
64
82
  :param npm_dist_tag: (experimental) The npm distribution tag to use for this branch. Default: "latest"
@@ -71,6 +89,7 @@ class BranchOptions:
71
89
  if __debug__:
72
90
  type_hints = typing.get_type_hints(_typecheckingstub__6f62eb98000deee3820f046309b2262c5063c0cb9581232fd1a44731f86986d7)
73
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"])
74
93
  check_type(argname="argument min_major_version", value=min_major_version, expected_type=type_hints["min_major_version"])
75
94
  check_type(argname="argument minor_version", value=minor_version, expected_type=type_hints["minor_version"])
76
95
  check_type(argname="argument npm_dist_tag", value=npm_dist_tag, expected_type=type_hints["npm_dist_tag"])
@@ -80,6 +99,8 @@ class BranchOptions:
80
99
  self._values: typing.Dict[builtins.str, typing.Any] = {
81
100
  "major_version": major_version,
82
101
  }
102
+ if environment is not None:
103
+ self._values["environment"] = environment
83
104
  if min_major_version is not None:
84
105
  self._values["min_major_version"] = min_major_version
85
106
  if minor_version is not None:
@@ -103,6 +124,23 @@ class BranchOptions:
103
124
  assert result is not None, "Required property 'major_version' is missing"
104
125
  return typing.cast(jsii.Number, result)
105
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
+
106
144
  @builtins.property
107
145
  def min_major_version(self) -> typing.Optional[jsii.Number]:
108
146
  '''(experimental) The minimum major version to release.
@@ -325,6 +363,7 @@ class CodeArtifactOptions:
325
363
  jsii_type="projen.release.CommonPublishOptions",
326
364
  jsii_struct_bases=[],
327
365
  name_mapping={
366
+ "github_environment": "githubEnvironment",
328
367
  "post_publish_steps": "postPublishSteps",
329
368
  "pre_publish_steps": "prePublishSteps",
330
369
  "publish_tools": "publishTools",
@@ -334,14 +373,16 @@ class CommonPublishOptions:
334
373
  def __init__(
335
374
  self,
336
375
  *,
376
+ github_environment: typing.Optional[builtins.str] = None,
337
377
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
338
378
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
339
379
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
340
380
  ) -> None:
341
381
  '''(experimental) Common publishing options.
342
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
343
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``.
344
- :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``.
345
386
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
346
387
 
347
388
  :stability: experimental
@@ -350,10 +391,13 @@ class CommonPublishOptions:
350
391
  publish_tools = _Tools_75b93a2a(**publish_tools)
351
392
  if __debug__:
352
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"])
353
395
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
354
396
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
355
397
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
356
398
  self._values: typing.Dict[builtins.str, typing.Any] = {}
399
+ if github_environment is not None:
400
+ self._values["github_environment"] = github_environment
357
401
  if post_publish_steps is not None:
358
402
  self._values["post_publish_steps"] = post_publish_steps
359
403
  if pre_publish_steps is not None:
@@ -361,6 +405,22 @@ class CommonPublishOptions:
361
405
  if publish_tools is not None:
362
406
  self._values["publish_tools"] = publish_tools
363
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
+
364
424
  @builtins.property
365
425
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
366
426
  '''(experimental) Steps to execute after executing the publishing command.
@@ -377,7 +437,7 @@ class CommonPublishOptions:
377
437
 
378
438
  @builtins.property
379
439
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
380
- '''(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.
381
441
 
382
442
  These steps are executed after ``dist/`` has been populated with the build
383
443
  output.
@@ -460,6 +520,7 @@ class ContinuousReleaseOptions:
460
520
  jsii_type="projen.release.GitHubReleasesPublishOptions",
461
521
  jsii_struct_bases=[CommonPublishOptions],
462
522
  name_mapping={
523
+ "github_environment": "githubEnvironment",
463
524
  "post_publish_steps": "postPublishSteps",
464
525
  "pre_publish_steps": "prePublishSteps",
465
526
  "publish_tools": "publishTools",
@@ -472,6 +533,7 @@ class GitHubReleasesPublishOptions(CommonPublishOptions):
472
533
  def __init__(
473
534
  self,
474
535
  *,
536
+ github_environment: typing.Optional[builtins.str] = None,
475
537
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
476
538
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
477
539
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -481,8 +543,9 @@ class GitHubReleasesPublishOptions(CommonPublishOptions):
481
543
  ) -> None:
482
544
  '''(experimental) Publishing options for GitHub releases.
483
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
484
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``.
485
- :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``.
486
549
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
487
550
  :param changelog_file: (experimental) The location of an .md file (relative to ``dist/``) that includes the changelog for the release.
488
551
  :param release_tag_file: (experimental) The location of a text file (relative to ``dist/``) that contains the release tag.
@@ -494,6 +557,7 @@ class GitHubReleasesPublishOptions(CommonPublishOptions):
494
557
  publish_tools = _Tools_75b93a2a(**publish_tools)
495
558
  if __debug__:
496
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"])
497
561
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
498
562
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
499
563
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
@@ -505,6 +569,8 @@ class GitHubReleasesPublishOptions(CommonPublishOptions):
505
569
  "release_tag_file": release_tag_file,
506
570
  "version_file": version_file,
507
571
  }
572
+ if github_environment is not None:
573
+ self._values["github_environment"] = github_environment
508
574
  if post_publish_steps is not None:
509
575
  self._values["post_publish_steps"] = post_publish_steps
510
576
  if pre_publish_steps is not None:
@@ -512,6 +578,22 @@ class GitHubReleasesPublishOptions(CommonPublishOptions):
512
578
  if publish_tools is not None:
513
579
  self._values["publish_tools"] = publish_tools
514
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
+
515
597
  @builtins.property
516
598
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
517
599
  '''(experimental) Steps to execute after executing the publishing command.
@@ -528,7 +610,7 @@ class GitHubReleasesPublishOptions(CommonPublishOptions):
528
610
 
529
611
  @builtins.property
530
612
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
531
- '''(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.
532
614
 
533
615
  These steps are executed after ``dist/`` has been populated with the build
534
616
  output.
@@ -748,13 +830,13 @@ class GitPublishOptions:
748
830
  jsii_type="projen.release.GoPublishOptions",
749
831
  jsii_struct_bases=[CommonPublishOptions],
750
832
  name_mapping={
833
+ "github_environment": "githubEnvironment",
751
834
  "post_publish_steps": "postPublishSteps",
752
835
  "pre_publish_steps": "prePublishSteps",
753
836
  "publish_tools": "publishTools",
754
837
  "git_branch": "gitBranch",
755
838
  "git_commit_message": "gitCommitMessage",
756
839
  "github_deploy_key_secret": "githubDeployKeySecret",
757
- "github_repo": "githubRepo",
758
840
  "github_token_secret": "githubTokenSecret",
759
841
  "github_use_ssh": "githubUseSsh",
760
842
  "git_user_email": "gitUserEmail",
@@ -765,13 +847,13 @@ class GoPublishOptions(CommonPublishOptions):
765
847
  def __init__(
766
848
  self,
767
849
  *,
850
+ github_environment: typing.Optional[builtins.str] = None,
768
851
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
769
852
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
770
853
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
771
854
  git_branch: typing.Optional[builtins.str] = None,
772
855
  git_commit_message: typing.Optional[builtins.str] = None,
773
856
  github_deploy_key_secret: typing.Optional[builtins.str] = None,
774
- github_repo: typing.Optional[builtins.str] = None,
775
857
  github_token_secret: typing.Optional[builtins.str] = None,
776
858
  github_use_ssh: typing.Optional[builtins.bool] = None,
777
859
  git_user_email: typing.Optional[builtins.str] = None,
@@ -779,17 +861,17 @@ class GoPublishOptions(CommonPublishOptions):
779
861
  ) -> None:
780
862
  '''(experimental) Options for Go releases.
781
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
782
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``.
783
- :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``.
784
867
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
785
868
  :param git_branch: (experimental) Branch to push to. Default: "main"
786
869
  :param git_commit_message: (experimental) The commit message. Default: "chore(release): $VERSION"
787
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"
788
- :param github_repo: (experimental) GitHub repository to push to. Default: - derived from ``moduleName``
789
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"
790
872
  :param github_use_ssh: (experimental) Use SSH to push to GitHub instead of a personal accses token. Default: false
791
- :param git_user_email: (experimental) The email to use in the release git commit. Default: "github-actions@github.com"
792
- :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
793
875
 
794
876
  :stability: experimental
795
877
  '''
@@ -797,18 +879,20 @@ class GoPublishOptions(CommonPublishOptions):
797
879
  publish_tools = _Tools_75b93a2a(**publish_tools)
798
880
  if __debug__:
799
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"])
800
883
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
801
884
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
802
885
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
803
886
  check_type(argname="argument git_branch", value=git_branch, expected_type=type_hints["git_branch"])
804
887
  check_type(argname="argument git_commit_message", value=git_commit_message, expected_type=type_hints["git_commit_message"])
805
888
  check_type(argname="argument github_deploy_key_secret", value=github_deploy_key_secret, expected_type=type_hints["github_deploy_key_secret"])
806
- check_type(argname="argument github_repo", value=github_repo, expected_type=type_hints["github_repo"])
807
889
  check_type(argname="argument github_token_secret", value=github_token_secret, expected_type=type_hints["github_token_secret"])
808
890
  check_type(argname="argument github_use_ssh", value=github_use_ssh, expected_type=type_hints["github_use_ssh"])
809
891
  check_type(argname="argument git_user_email", value=git_user_email, expected_type=type_hints["git_user_email"])
810
892
  check_type(argname="argument git_user_name", value=git_user_name, expected_type=type_hints["git_user_name"])
811
893
  self._values: typing.Dict[builtins.str, typing.Any] = {}
894
+ if github_environment is not None:
895
+ self._values["github_environment"] = github_environment
812
896
  if post_publish_steps is not None:
813
897
  self._values["post_publish_steps"] = post_publish_steps
814
898
  if pre_publish_steps is not None:
@@ -821,8 +905,6 @@ class GoPublishOptions(CommonPublishOptions):
821
905
  self._values["git_commit_message"] = git_commit_message
822
906
  if github_deploy_key_secret is not None:
823
907
  self._values["github_deploy_key_secret"] = github_deploy_key_secret
824
- if github_repo is not None:
825
- self._values["github_repo"] = github_repo
826
908
  if github_token_secret is not None:
827
909
  self._values["github_token_secret"] = github_token_secret
828
910
  if github_use_ssh is not None:
@@ -832,6 +914,22 @@ class GoPublishOptions(CommonPublishOptions):
832
914
  if git_user_name is not None:
833
915
  self._values["git_user_name"] = git_user_name
834
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
+
835
933
  @builtins.property
836
934
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
837
935
  '''(experimental) Steps to execute after executing the publishing command.
@@ -848,7 +946,7 @@ class GoPublishOptions(CommonPublishOptions):
848
946
 
849
947
  @builtins.property
850
948
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
851
- '''(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.
852
950
 
853
951
  These steps are executed after ``dist/`` has been populated with the build
854
952
  output.
@@ -906,17 +1004,6 @@ class GoPublishOptions(CommonPublishOptions):
906
1004
  result = self._values.get("github_deploy_key_secret")
907
1005
  return typing.cast(typing.Optional[builtins.str], result)
908
1006
 
909
- @builtins.property
910
- def github_repo(self) -> typing.Optional[builtins.str]:
911
- '''(experimental) GitHub repository to push to.
912
-
913
- :default: - derived from ``moduleName``
914
-
915
- :stability: experimental
916
- '''
917
- result = self._values.get("github_repo")
918
- return typing.cast(typing.Optional[builtins.str], result)
919
-
920
1007
  @builtins.property
921
1008
  def github_token_secret(self) -> typing.Optional[builtins.str]:
922
1009
  '''(experimental) The name of the secret that includes a personal GitHub access token used to push to the GitHub repository.
@@ -945,7 +1032,7 @@ class GoPublishOptions(CommonPublishOptions):
945
1032
  def git_user_email(self) -> typing.Optional[builtins.str]:
946
1033
  '''(experimental) The email to use in the release git commit.
947
1034
 
948
- :default: "github-actions@github.com"
1035
+ :default: - default GitHub Actions user email
949
1036
 
950
1037
  :stability: experimental
951
1038
  '''
@@ -956,7 +1043,7 @@ class GoPublishOptions(CommonPublishOptions):
956
1043
  def git_user_name(self) -> typing.Optional[builtins.str]:
957
1044
  '''(experimental) The user name to use for the release git commit.
958
1045
 
959
- :default: "github-actions"
1046
+ :default: - default GitHub Actions user name
960
1047
 
961
1048
  :stability: experimental
962
1049
  '''
@@ -979,13 +1066,13 @@ class GoPublishOptions(CommonPublishOptions):
979
1066
  jsii_type="projen.release.JsiiReleaseGo",
980
1067
  jsii_struct_bases=[GoPublishOptions],
981
1068
  name_mapping={
1069
+ "github_environment": "githubEnvironment",
982
1070
  "post_publish_steps": "postPublishSteps",
983
1071
  "pre_publish_steps": "prePublishSteps",
984
1072
  "publish_tools": "publishTools",
985
1073
  "git_branch": "gitBranch",
986
1074
  "git_commit_message": "gitCommitMessage",
987
1075
  "github_deploy_key_secret": "githubDeployKeySecret",
988
- "github_repo": "githubRepo",
989
1076
  "github_token_secret": "githubTokenSecret",
990
1077
  "github_use_ssh": "githubUseSsh",
991
1078
  "git_user_email": "gitUserEmail",
@@ -996,30 +1083,30 @@ class JsiiReleaseGo(GoPublishOptions):
996
1083
  def __init__(
997
1084
  self,
998
1085
  *,
1086
+ github_environment: typing.Optional[builtins.str] = None,
999
1087
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1000
1088
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1001
1089
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
1002
1090
  git_branch: typing.Optional[builtins.str] = None,
1003
1091
  git_commit_message: typing.Optional[builtins.str] = None,
1004
1092
  github_deploy_key_secret: typing.Optional[builtins.str] = None,
1005
- github_repo: typing.Optional[builtins.str] = None,
1006
1093
  github_token_secret: typing.Optional[builtins.str] = None,
1007
1094
  github_use_ssh: typing.Optional[builtins.bool] = None,
1008
1095
  git_user_email: typing.Optional[builtins.str] = None,
1009
1096
  git_user_name: typing.Optional[builtins.str] = None,
1010
1097
  ) -> None:
1011
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
1012
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``.
1013
- :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``.
1014
1102
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
1015
1103
  :param git_branch: (experimental) Branch to push to. Default: "main"
1016
1104
  :param git_commit_message: (experimental) The commit message. Default: "chore(release): $VERSION"
1017
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"
1018
- :param github_repo: (experimental) GitHub repository to push to. Default: - derived from ``moduleName``
1019
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"
1020
1107
  :param github_use_ssh: (experimental) Use SSH to push to GitHub instead of a personal accses token. Default: false
1021
- :param git_user_email: (experimental) The email to use in the release git commit. Default: "github-actions@github.com"
1022
- :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
1023
1110
 
1024
1111
  :deprecated: Use ``GoPublishOptions`` instead.
1025
1112
 
@@ -1029,18 +1116,20 @@ class JsiiReleaseGo(GoPublishOptions):
1029
1116
  publish_tools = _Tools_75b93a2a(**publish_tools)
1030
1117
  if __debug__:
1031
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"])
1032
1120
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
1033
1121
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
1034
1122
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
1035
1123
  check_type(argname="argument git_branch", value=git_branch, expected_type=type_hints["git_branch"])
1036
1124
  check_type(argname="argument git_commit_message", value=git_commit_message, expected_type=type_hints["git_commit_message"])
1037
1125
  check_type(argname="argument github_deploy_key_secret", value=github_deploy_key_secret, expected_type=type_hints["github_deploy_key_secret"])
1038
- check_type(argname="argument github_repo", value=github_repo, expected_type=type_hints["github_repo"])
1039
1126
  check_type(argname="argument github_token_secret", value=github_token_secret, expected_type=type_hints["github_token_secret"])
1040
1127
  check_type(argname="argument github_use_ssh", value=github_use_ssh, expected_type=type_hints["github_use_ssh"])
1041
1128
  check_type(argname="argument git_user_email", value=git_user_email, expected_type=type_hints["git_user_email"])
1042
1129
  check_type(argname="argument git_user_name", value=git_user_name, expected_type=type_hints["git_user_name"])
1043
1130
  self._values: typing.Dict[builtins.str, typing.Any] = {}
1131
+ if github_environment is not None:
1132
+ self._values["github_environment"] = github_environment
1044
1133
  if post_publish_steps is not None:
1045
1134
  self._values["post_publish_steps"] = post_publish_steps
1046
1135
  if pre_publish_steps is not None:
@@ -1053,8 +1142,6 @@ class JsiiReleaseGo(GoPublishOptions):
1053
1142
  self._values["git_commit_message"] = git_commit_message
1054
1143
  if github_deploy_key_secret is not None:
1055
1144
  self._values["github_deploy_key_secret"] = github_deploy_key_secret
1056
- if github_repo is not None:
1057
- self._values["github_repo"] = github_repo
1058
1145
  if github_token_secret is not None:
1059
1146
  self._values["github_token_secret"] = github_token_secret
1060
1147
  if github_use_ssh is not None:
@@ -1064,6 +1151,22 @@ class JsiiReleaseGo(GoPublishOptions):
1064
1151
  if git_user_name is not None:
1065
1152
  self._values["git_user_name"] = git_user_name
1066
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
+
1067
1170
  @builtins.property
1068
1171
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
1069
1172
  '''(experimental) Steps to execute after executing the publishing command.
@@ -1080,7 +1183,7 @@ class JsiiReleaseGo(GoPublishOptions):
1080
1183
 
1081
1184
  @builtins.property
1082
1185
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
1083
- '''(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.
1084
1187
 
1085
1188
  These steps are executed after ``dist/`` has been populated with the build
1086
1189
  output.
@@ -1138,17 +1241,6 @@ class JsiiReleaseGo(GoPublishOptions):
1138
1241
  result = self._values.get("github_deploy_key_secret")
1139
1242
  return typing.cast(typing.Optional[builtins.str], result)
1140
1243
 
1141
- @builtins.property
1142
- def github_repo(self) -> typing.Optional[builtins.str]:
1143
- '''(experimental) GitHub repository to push to.
1144
-
1145
- :default: - derived from ``moduleName``
1146
-
1147
- :stability: experimental
1148
- '''
1149
- result = self._values.get("github_repo")
1150
- return typing.cast(typing.Optional[builtins.str], result)
1151
-
1152
1244
  @builtins.property
1153
1245
  def github_token_secret(self) -> typing.Optional[builtins.str]:
1154
1246
  '''(experimental) The name of the secret that includes a personal GitHub access token used to push to the GitHub repository.
@@ -1177,7 +1269,7 @@ class JsiiReleaseGo(GoPublishOptions):
1177
1269
  def git_user_email(self) -> typing.Optional[builtins.str]:
1178
1270
  '''(experimental) The email to use in the release git commit.
1179
1271
 
1180
- :default: "github-actions@github.com"
1272
+ :default: - default GitHub Actions user email
1181
1273
 
1182
1274
  :stability: experimental
1183
1275
  '''
@@ -1188,7 +1280,7 @@ class JsiiReleaseGo(GoPublishOptions):
1188
1280
  def git_user_name(self) -> typing.Optional[builtins.str]:
1189
1281
  '''(experimental) The user name to use for the release git commit.
1190
1282
 
1191
- :default: "github-actions"
1283
+ :default: - default GitHub Actions user name
1192
1284
 
1193
1285
  :stability: experimental
1194
1286
  '''
@@ -1295,6 +1387,7 @@ class ManualReleaseOptions:
1295
1387
  jsii_type="projen.release.MavenPublishOptions",
1296
1388
  jsii_struct_bases=[CommonPublishOptions],
1297
1389
  name_mapping={
1390
+ "github_environment": "githubEnvironment",
1298
1391
  "post_publish_steps": "postPublishSteps",
1299
1392
  "pre_publish_steps": "prePublishSteps",
1300
1393
  "publish_tools": "publishTools",
@@ -1312,6 +1405,7 @@ class MavenPublishOptions(CommonPublishOptions):
1312
1405
  def __init__(
1313
1406
  self,
1314
1407
  *,
1408
+ github_environment: typing.Optional[builtins.str] = None,
1315
1409
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1316
1410
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1317
1411
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -1326,15 +1420,16 @@ class MavenPublishOptions(CommonPublishOptions):
1326
1420
  ) -> None:
1327
1421
  '''(experimental) Options for Maven releases.
1328
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
1329
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``.
1330
- :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``.
1331
1426
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
1332
- :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
1333
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
1334
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
1335
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
1336
1431
  :param maven_repository_url: (experimental) Deployment repository when not deploying to Maven Central. Default: - not set
1337
- :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
1338
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
1339
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
1340
1435
 
@@ -1344,6 +1439,7 @@ class MavenPublishOptions(CommonPublishOptions):
1344
1439
  publish_tools = _Tools_75b93a2a(**publish_tools)
1345
1440
  if __debug__:
1346
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"])
1347
1443
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
1348
1444
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
1349
1445
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
@@ -1356,6 +1452,8 @@ class MavenPublishOptions(CommonPublishOptions):
1356
1452
  check_type(argname="argument maven_staging_profile_id", value=maven_staging_profile_id, expected_type=type_hints["maven_staging_profile_id"])
1357
1453
  check_type(argname="argument maven_username", value=maven_username, expected_type=type_hints["maven_username"])
1358
1454
  self._values: typing.Dict[builtins.str, typing.Any] = {}
1455
+ if github_environment is not None:
1456
+ self._values["github_environment"] = github_environment
1359
1457
  if post_publish_steps is not None:
1360
1458
  self._values["post_publish_steps"] = post_publish_steps
1361
1459
  if pre_publish_steps is not None:
@@ -1379,6 +1477,22 @@ class MavenPublishOptions(CommonPublishOptions):
1379
1477
  if maven_username is not None:
1380
1478
  self._values["maven_username"] = maven_username
1381
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
+
1382
1496
  @builtins.property
1383
1497
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
1384
1498
  '''(experimental) Steps to execute after executing the publishing command.
@@ -1395,7 +1509,7 @@ class MavenPublishOptions(CommonPublishOptions):
1395
1509
 
1396
1510
  @builtins.property
1397
1511
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
1398
- '''(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.
1399
1513
 
1400
1514
  These steps are executed after ``dist/`` has been populated with the build
1401
1515
  output.
@@ -1424,7 +1538,7 @@ class MavenPublishOptions(CommonPublishOptions):
1424
1538
 
1425
1539
  if not set, defaults to https://oss.sonatype.org
1426
1540
 
1427
- :default: "https://oss.sonatype.org"
1541
+ :default: - "https://oss.sonatype.org" or none when publishing to Maven Central
1428
1542
 
1429
1543
  :stability: experimental
1430
1544
  '''
@@ -1490,7 +1604,9 @@ class MavenPublishOptions(CommonPublishOptions):
1490
1604
  def maven_server_id(self) -> typing.Optional[builtins.str]:
1491
1605
  '''(experimental) Used in maven settings for credential lookup (e.g. use github when publishing to GitHub).
1492
1606
 
1493
- :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
1494
1610
 
1495
1611
  :stability: experimental
1496
1612
  '''
@@ -1539,6 +1655,7 @@ class MavenPublishOptions(CommonPublishOptions):
1539
1655
  jsii_type="projen.release.NpmPublishOptions",
1540
1656
  jsii_struct_bases=[CommonPublishOptions],
1541
1657
  name_mapping={
1658
+ "github_environment": "githubEnvironment",
1542
1659
  "post_publish_steps": "postPublishSteps",
1543
1660
  "pre_publish_steps": "prePublishSteps",
1544
1661
  "publish_tools": "publishTools",
@@ -1547,12 +1664,14 @@ class MavenPublishOptions(CommonPublishOptions):
1547
1664
  "npm_provenance": "npmProvenance",
1548
1665
  "npm_token_secret": "npmTokenSecret",
1549
1666
  "registry": "registry",
1667
+ "trusted_publishing": "trustedPublishing",
1550
1668
  },
1551
1669
  )
1552
1670
  class NpmPublishOptions(CommonPublishOptions):
1553
1671
  def __init__(
1554
1672
  self,
1555
1673
  *,
1674
+ github_environment: typing.Optional[builtins.str] = None,
1556
1675
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1557
1676
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1558
1677
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -1561,17 +1680,20 @@ class NpmPublishOptions(CommonPublishOptions):
1561
1680
  npm_provenance: typing.Optional[builtins.bool] = None,
1562
1681
  npm_token_secret: typing.Optional[builtins.str] = None,
1563
1682
  registry: typing.Optional[builtins.str] = None,
1683
+ trusted_publishing: typing.Optional[builtins.bool] = None,
1564
1684
  ) -> None:
1565
1685
  '''(experimental) Options for npm release.
1566
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
1567
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``.
1568
- :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``.
1569
1690
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
1570
- :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
1571
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"
1572
- :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. Default: - undefined
1573
- :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``.
1574
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
1575
1697
 
1576
1698
  :stability: experimental
1577
1699
  '''
@@ -1581,6 +1703,7 @@ class NpmPublishOptions(CommonPublishOptions):
1581
1703
  code_artifact_options = CodeArtifactOptions(**code_artifact_options)
1582
1704
  if __debug__:
1583
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"])
1584
1707
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
1585
1708
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
1586
1709
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
@@ -1589,7 +1712,10 @@ class NpmPublishOptions(CommonPublishOptions):
1589
1712
  check_type(argname="argument npm_provenance", value=npm_provenance, expected_type=type_hints["npm_provenance"])
1590
1713
  check_type(argname="argument npm_token_secret", value=npm_token_secret, expected_type=type_hints["npm_token_secret"])
1591
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"])
1592
1716
  self._values: typing.Dict[builtins.str, typing.Any] = {}
1717
+ if github_environment is not None:
1718
+ self._values["github_environment"] = github_environment
1593
1719
  if post_publish_steps is not None:
1594
1720
  self._values["post_publish_steps"] = post_publish_steps
1595
1721
  if pre_publish_steps is not None:
@@ -1606,6 +1732,24 @@ class NpmPublishOptions(CommonPublishOptions):
1606
1732
  self._values["npm_token_secret"] = npm_token_secret
1607
1733
  if registry is not None:
1608
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)
1609
1753
 
1610
1754
  @builtins.property
1611
1755
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
@@ -1623,7 +1767,7 @@ class NpmPublishOptions(CommonPublishOptions):
1623
1767
 
1624
1768
  @builtins.property
1625
1769
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
1626
- '''(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.
1627
1771
 
1628
1772
  These steps are executed after ``dist/`` has been populated with the build
1629
1773
  output.
@@ -1650,7 +1794,7 @@ class NpmPublishOptions(CommonPublishOptions):
1650
1794
  def code_artifact_options(self) -> typing.Optional[CodeArtifactOptions]:
1651
1795
  '''(experimental) Options for publishing npm package to AWS CodeArtifact.
1652
1796
 
1653
- :default: - undefined
1797
+ :default: - package is not published to
1654
1798
 
1655
1799
  :stability: experimental
1656
1800
  '''
@@ -1688,7 +1832,9 @@ class NpmPublishOptions(CommonPublishOptions):
1688
1832
  Note that this component is using ``publib`` to publish packages,
1689
1833
  which is using npm internally and supports provenance statements independently of the package manager used.
1690
1834
 
1691
- :default: - undefined
1835
+ Only works in supported CI/CD environments.
1836
+
1837
+ :default: - enabled for for public packages using trusted publishing, disabled otherwise
1692
1838
 
1693
1839
  :see: https://docs.npmjs.com/generating-provenance-statements
1694
1840
  :stability: experimental
@@ -1698,7 +1844,7 @@ class NpmPublishOptions(CommonPublishOptions):
1698
1844
 
1699
1845
  @builtins.property
1700
1846
  def npm_token_secret(self) -> typing.Optional[builtins.str]:
1701
- '''(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.
1702
1848
 
1703
1849
  :default: - "NPM_TOKEN" or "GITHUB_TOKEN" if ``registry`` is set to ``npm.pkg.github.com``.
1704
1850
 
@@ -1728,6 +1874,21 @@ class NpmPublishOptions(CommonPublishOptions):
1728
1874
  result = self._values.get("registry")
1729
1875
  return typing.cast(typing.Optional[builtins.str], result)
1730
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
+
1731
1892
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
1732
1893
  return isinstance(rhs, self.__class__) and rhs._values == self._values
1733
1894
 
@@ -1744,30 +1905,39 @@ class NpmPublishOptions(CommonPublishOptions):
1744
1905
  jsii_type="projen.release.NugetPublishOptions",
1745
1906
  jsii_struct_bases=[CommonPublishOptions],
1746
1907
  name_mapping={
1908
+ "github_environment": "githubEnvironment",
1747
1909
  "post_publish_steps": "postPublishSteps",
1748
1910
  "pre_publish_steps": "prePublishSteps",
1749
1911
  "publish_tools": "publishTools",
1750
1912
  "nuget_api_key_secret": "nugetApiKeySecret",
1751
1913
  "nuget_server": "nugetServer",
1914
+ "nuget_username_secret": "nugetUsernameSecret",
1915
+ "trusted_publishing": "trustedPublishing",
1752
1916
  },
1753
1917
  )
1754
1918
  class NugetPublishOptions(CommonPublishOptions):
1755
1919
  def __init__(
1756
1920
  self,
1757
1921
  *,
1922
+ github_environment: typing.Optional[builtins.str] = None,
1758
1923
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1759
1924
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
1760
1925
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
1761
1926
  nuget_api_key_secret: typing.Optional[builtins.str] = None,
1762
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,
1763
1930
  ) -> None:
1764
1931
  '''(experimental) Options for NuGet releases.
1765
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
1766
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``.
1767
- :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``.
1768
1936
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
1769
1937
  :param nuget_api_key_secret: (experimental) GitHub secret which contains the API key for NuGet. Default: "NUGET_API_KEY"
1770
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.
1771
1941
 
1772
1942
  :stability: experimental
1773
1943
  '''
@@ -1775,12 +1945,17 @@ class NugetPublishOptions(CommonPublishOptions):
1775
1945
  publish_tools = _Tools_75b93a2a(**publish_tools)
1776
1946
  if __debug__:
1777
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"])
1778
1949
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
1779
1950
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
1780
1951
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
1781
1952
  check_type(argname="argument nuget_api_key_secret", value=nuget_api_key_secret, expected_type=type_hints["nuget_api_key_secret"])
1782
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"])
1783
1956
  self._values: typing.Dict[builtins.str, typing.Any] = {}
1957
+ if github_environment is not None:
1958
+ self._values["github_environment"] = github_environment
1784
1959
  if post_publish_steps is not None:
1785
1960
  self._values["post_publish_steps"] = post_publish_steps
1786
1961
  if pre_publish_steps is not None:
@@ -1791,6 +1966,26 @@ class NugetPublishOptions(CommonPublishOptions):
1791
1966
  self._values["nuget_api_key_secret"] = nuget_api_key_secret
1792
1967
  if nuget_server is not None:
1793
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)
1794
1989
 
1795
1990
  @builtins.property
1796
1991
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
@@ -1808,7 +2003,7 @@ class NugetPublishOptions(CommonPublishOptions):
1808
2003
 
1809
2004
  @builtins.property
1810
2005
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
1811
- '''(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.
1812
2007
 
1813
2008
  These steps are executed after ``dist/`` has been populated with the build
1814
2009
  output.
@@ -1851,6 +2046,31 @@ class NugetPublishOptions(CommonPublishOptions):
1851
2046
  result = self._values.get("nuget_server")
1852
2047
  return typing.cast(typing.Optional[builtins.str], result)
1853
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
+
1854
2074
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
1855
2075
  return isinstance(rhs, self.__class__) and rhs._values == self._values
1856
2076
 
@@ -1905,7 +2125,7 @@ class Publisher(
1905
2125
  :param publib_version: (experimental) Version requirement for ``publib``. Default: "latest"
1906
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
1907
2127
  :param workflow_container_image: (experimental) Container image to use for GitHub workflows. Default: - default image
1908
- :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/*
1909
2129
  :param workflow_runs_on: (experimental) Github Runner selection labels. Default: ["ubuntu-latest"]
1910
2130
  :param workflow_runs_on_group: (experimental) Github Runner Group selection options.
1911
2131
 
@@ -2000,6 +2220,7 @@ class Publisher(
2000
2220
  changelog_file: builtins.str,
2001
2221
  release_tag_file: builtins.str,
2002
2222
  version_file: builtins.str,
2223
+ github_environment: typing.Optional[builtins.str] = None,
2003
2224
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2004
2225
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2005
2226
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -2009,8 +2230,9 @@ class Publisher(
2009
2230
  :param changelog_file: (experimental) The location of an .md file (relative to ``dist/``) that includes the changelog for the release.
2010
2231
  :param release_tag_file: (experimental) The location of a text file (relative to ``dist/``) that contains the release tag.
2011
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
2012
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``.
2013
- :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``.
2014
2236
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
2015
2237
 
2016
2238
  :stability: experimental
@@ -2019,6 +2241,7 @@ class Publisher(
2019
2241
  changelog_file=changelog_file,
2020
2242
  release_tag_file=release_tag_file,
2021
2243
  version_file=version_file,
2244
+ github_environment=github_environment,
2022
2245
  post_publish_steps=post_publish_steps,
2023
2246
  pre_publish_steps=pre_publish_steps,
2024
2247
  publish_tools=publish_tools,
@@ -2033,11 +2256,11 @@ class Publisher(
2033
2256
  git_branch: typing.Optional[builtins.str] = None,
2034
2257
  git_commit_message: typing.Optional[builtins.str] = None,
2035
2258
  github_deploy_key_secret: typing.Optional[builtins.str] = None,
2036
- github_repo: typing.Optional[builtins.str] = None,
2037
2259
  github_token_secret: typing.Optional[builtins.str] = None,
2038
2260
  github_use_ssh: typing.Optional[builtins.bool] = None,
2039
2261
  git_user_email: typing.Optional[builtins.str] = None,
2040
2262
  git_user_name: typing.Optional[builtins.str] = None,
2263
+ github_environment: typing.Optional[builtins.str] = None,
2041
2264
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2042
2265
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2043
2266
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -2047,13 +2270,13 @@ class Publisher(
2047
2270
  :param git_branch: (experimental) Branch to push to. Default: "main"
2048
2271
  :param git_commit_message: (experimental) The commit message. Default: "chore(release): $VERSION"
2049
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"
2050
- :param github_repo: (experimental) GitHub repository to push to. Default: - derived from ``moduleName``
2051
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"
2052
2274
  :param github_use_ssh: (experimental) Use SSH to push to GitHub instead of a personal accses token. Default: false
2053
- :param git_user_email: (experimental) The email to use in the release git commit. Default: "github-actions@github.com"
2054
- :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
2055
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``.
2056
- :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``.
2057
2280
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
2058
2281
 
2059
2282
  :stability: experimental
@@ -2062,11 +2285,11 @@ class Publisher(
2062
2285
  git_branch=git_branch,
2063
2286
  git_commit_message=git_commit_message,
2064
2287
  github_deploy_key_secret=github_deploy_key_secret,
2065
- github_repo=github_repo,
2066
2288
  github_token_secret=github_token_secret,
2067
2289
  github_use_ssh=github_use_ssh,
2068
2290
  git_user_email=git_user_email,
2069
2291
  git_user_name=git_user_name,
2292
+ github_environment=github_environment,
2070
2293
  post_publish_steps=post_publish_steps,
2071
2294
  pre_publish_steps=pre_publish_steps,
2072
2295
  publish_tools=publish_tools,
@@ -2086,22 +2309,24 @@ class Publisher(
2086
2309
  maven_server_id: typing.Optional[builtins.str] = None,
2087
2310
  maven_staging_profile_id: typing.Optional[builtins.str] = None,
2088
2311
  maven_username: typing.Optional[builtins.str] = None,
2312
+ github_environment: typing.Optional[builtins.str] = None,
2089
2313
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2090
2314
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2091
2315
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
2092
2316
  ) -> None:
2093
2317
  '''(experimental) Publishes artifacts from ``java/**`` to Maven.
2094
2318
 
2095
- :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
2096
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
2097
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
2098
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
2099
2323
  :param maven_repository_url: (experimental) Deployment repository when not deploying to Maven Central. Default: - not set
2100
- :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
2101
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
2102
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
2103
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``.
2104
- :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``.
2105
2330
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
2106
2331
 
2107
2332
  :stability: experimental
@@ -2115,6 +2340,7 @@ class Publisher(
2115
2340
  maven_server_id=maven_server_id,
2116
2341
  maven_staging_profile_id=maven_staging_profile_id,
2117
2342
  maven_username=maven_username,
2343
+ github_environment=github_environment,
2118
2344
  post_publish_steps=post_publish_steps,
2119
2345
  pre_publish_steps=pre_publish_steps,
2120
2346
  publish_tools=publish_tools,
@@ -2131,19 +2357,23 @@ class Publisher(
2131
2357
  npm_provenance: typing.Optional[builtins.bool] = None,
2132
2358
  npm_token_secret: typing.Optional[builtins.str] = None,
2133
2359
  registry: typing.Optional[builtins.str] = None,
2360
+ trusted_publishing: typing.Optional[builtins.bool] = None,
2361
+ github_environment: typing.Optional[builtins.str] = None,
2134
2362
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2135
2363
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2136
2364
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
2137
2365
  ) -> None:
2138
2366
  '''(experimental) Publishes artifacts from ``js/**`` to npm.
2139
2367
 
2140
- :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
2141
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"
2142
- :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. Default: - undefined
2143
- :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``.
2144
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
2145
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``.
2146
- :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``.
2147
2377
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
2148
2378
 
2149
2379
  :stability: experimental
@@ -2154,6 +2384,8 @@ class Publisher(
2154
2384
  npm_provenance=npm_provenance,
2155
2385
  npm_token_secret=npm_token_secret,
2156
2386
  registry=registry,
2387
+ trusted_publishing=trusted_publishing,
2388
+ github_environment=github_environment,
2157
2389
  post_publish_steps=post_publish_steps,
2158
2390
  pre_publish_steps=pre_publish_steps,
2159
2391
  publish_tools=publish_tools,
@@ -2167,6 +2399,9 @@ class Publisher(
2167
2399
  *,
2168
2400
  nuget_api_key_secret: typing.Optional[builtins.str] = None,
2169
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,
2170
2405
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2171
2406
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2172
2407
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -2175,8 +2410,11 @@ class Publisher(
2175
2410
 
2176
2411
  :param nuget_api_key_secret: (experimental) GitHub secret which contains the API key for NuGet. Default: "NUGET_API_KEY"
2177
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
2178
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``.
2179
- :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``.
2180
2418
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
2181
2419
 
2182
2420
  :stability: experimental
@@ -2184,6 +2422,9 @@ class Publisher(
2184
2422
  options = NugetPublishOptions(
2185
2423
  nuget_api_key_secret=nuget_api_key_secret,
2186
2424
  nuget_server=nuget_server,
2425
+ nuget_username_secret=nuget_username_secret,
2426
+ trusted_publishing=trusted_publishing,
2427
+ github_environment=github_environment,
2187
2428
  post_publish_steps=post_publish_steps,
2188
2429
  pre_publish_steps=pre_publish_steps,
2189
2430
  publish_tools=publish_tools,
@@ -2195,31 +2436,40 @@ class Publisher(
2195
2436
  def publish_to_py_pi(
2196
2437
  self,
2197
2438
  *,
2439
+ attestations: typing.Optional[builtins.bool] = None,
2198
2440
  code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2441
+ trusted_publishing: typing.Optional[builtins.bool] = None,
2199
2442
  twine_password_secret: typing.Optional[builtins.str] = None,
2200
2443
  twine_registry_url: typing.Optional[builtins.str] = None,
2201
2444
  twine_username_secret: typing.Optional[builtins.str] = None,
2445
+ github_environment: typing.Optional[builtins.str] = None,
2202
2446
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2203
2447
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2204
2448
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
2205
2449
  ) -> None:
2206
2450
  '''(experimental) Publishes wheel artifacts from ``python`` to PyPI.
2207
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
2208
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.
2209
2455
  :param twine_password_secret: (experimental) The GitHub secret which contains PyPI password. Default: "TWINE_PASSWORD"
2210
2456
  :param twine_registry_url: (experimental) The registry url to use when releasing packages. Default: - twine default
2211
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
2212
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``.
2213
- :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``.
2214
2461
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
2215
2462
 
2216
2463
  :stability: experimental
2217
2464
  '''
2218
2465
  options = PyPiPublishOptions(
2466
+ attestations=attestations,
2219
2467
  code_artifact_options=code_artifact_options,
2468
+ trusted_publishing=trusted_publishing,
2220
2469
  twine_password_secret=twine_password_secret,
2221
2470
  twine_registry_url=twine_registry_url,
2222
2471
  twine_username_secret=twine_username_secret,
2472
+ github_environment=github_environment,
2223
2473
  post_publish_steps=post_publish_steps,
2224
2474
  pre_publish_steps=pre_publish_steps,
2225
2475
  publish_tools=publish_tools,
@@ -2327,7 +2577,7 @@ class PublisherOptions:
2327
2577
  :param publib_version: (experimental) Version requirement for ``publib``. Default: "latest"
2328
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
2329
2579
  :param workflow_container_image: (experimental) Container image to use for GitHub workflows. Default: - default image
2330
- :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/*
2331
2581
  :param workflow_runs_on: (experimental) Github Runner selection labels. Default: ["ubuntu-latest"]
2332
2582
  :param workflow_runs_on_group: (experimental) Github Runner Group selection options.
2333
2583
 
@@ -2503,7 +2753,7 @@ class PublisherOptions:
2503
2753
  For example ``publib``, the CLI projen uses to publish releases,
2504
2754
  is an npm library.
2505
2755
 
2506
- :default: 18.x
2756
+ :default: lts/*
2507
2757
 
2508
2758
  :stability: experimental
2509
2759
  '''
@@ -2550,10 +2800,13 @@ class PublisherOptions:
2550
2800
  jsii_type="projen.release.PyPiPublishOptions",
2551
2801
  jsii_struct_bases=[CommonPublishOptions],
2552
2802
  name_mapping={
2803
+ "github_environment": "githubEnvironment",
2553
2804
  "post_publish_steps": "postPublishSteps",
2554
2805
  "pre_publish_steps": "prePublishSteps",
2555
2806
  "publish_tools": "publishTools",
2807
+ "attestations": "attestations",
2556
2808
  "code_artifact_options": "codeArtifactOptions",
2809
+ "trusted_publishing": "trustedPublishing",
2557
2810
  "twine_password_secret": "twinePasswordSecret",
2558
2811
  "twine_registry_url": "twineRegistryUrl",
2559
2812
  "twine_username_secret": "twineUsernameSecret",
@@ -2563,20 +2816,26 @@ class PyPiPublishOptions(CommonPublishOptions):
2563
2816
  def __init__(
2564
2817
  self,
2565
2818
  *,
2819
+ github_environment: typing.Optional[builtins.str] = None,
2566
2820
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2567
2821
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2568
2822
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
2823
+ attestations: typing.Optional[builtins.bool] = None,
2569
2824
  code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
2825
+ trusted_publishing: typing.Optional[builtins.bool] = None,
2570
2826
  twine_password_secret: typing.Optional[builtins.str] = None,
2571
2827
  twine_registry_url: typing.Optional[builtins.str] = None,
2572
2828
  twine_username_secret: typing.Optional[builtins.str] = None,
2573
2829
  ) -> None:
2574
2830
  '''(experimental) Options for PyPI release.
2575
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
2576
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``.
2577
- :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``.
2578
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
2579
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.
2580
2839
  :param twine_password_secret: (experimental) The GitHub secret which contains PyPI password. Default: "TWINE_PASSWORD"
2581
2840
  :param twine_registry_url: (experimental) The registry url to use when releasing packages. Default: - twine default
2582
2841
  :param twine_username_secret: (experimental) The GitHub secret which contains PyPI user name. Default: "TWINE_USERNAME"
@@ -2589,22 +2848,31 @@ class PyPiPublishOptions(CommonPublishOptions):
2589
2848
  code_artifact_options = CodeArtifactOptions(**code_artifact_options)
2590
2849
  if __debug__:
2591
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"])
2592
2852
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
2593
2853
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
2594
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"])
2595
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"])
2596
2858
  check_type(argname="argument twine_password_secret", value=twine_password_secret, expected_type=type_hints["twine_password_secret"])
2597
2859
  check_type(argname="argument twine_registry_url", value=twine_registry_url, expected_type=type_hints["twine_registry_url"])
2598
2860
  check_type(argname="argument twine_username_secret", value=twine_username_secret, expected_type=type_hints["twine_username_secret"])
2599
2861
  self._values: typing.Dict[builtins.str, typing.Any] = {}
2862
+ if github_environment is not None:
2863
+ self._values["github_environment"] = github_environment
2600
2864
  if post_publish_steps is not None:
2601
2865
  self._values["post_publish_steps"] = post_publish_steps
2602
2866
  if pre_publish_steps is not None:
2603
2867
  self._values["pre_publish_steps"] = pre_publish_steps
2604
2868
  if publish_tools is not None:
2605
2869
  self._values["publish_tools"] = publish_tools
2870
+ if attestations is not None:
2871
+ self._values["attestations"] = attestations
2606
2872
  if code_artifact_options is not None:
2607
2873
  self._values["code_artifact_options"] = code_artifact_options
2874
+ if trusted_publishing is not None:
2875
+ self._values["trusted_publishing"] = trusted_publishing
2608
2876
  if twine_password_secret is not None:
2609
2877
  self._values["twine_password_secret"] = twine_password_secret
2610
2878
  if twine_registry_url is not None:
@@ -2612,6 +2880,22 @@ class PyPiPublishOptions(CommonPublishOptions):
2612
2880
  if twine_username_secret is not None:
2613
2881
  self._values["twine_username_secret"] = twine_username_secret
2614
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
+
2615
2899
  @builtins.property
2616
2900
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
2617
2901
  '''(experimental) Steps to execute after executing the publishing command.
@@ -2628,7 +2912,7 @@ class PyPiPublishOptions(CommonPublishOptions):
2628
2912
 
2629
2913
  @builtins.property
2630
2914
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
2631
- '''(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.
2632
2916
 
2633
2917
  These steps are executed after ``dist/`` has been populated with the build
2634
2918
  output.
@@ -2651,6 +2935,21 @@ class PyPiPublishOptions(CommonPublishOptions):
2651
2935
  result = self._values.get("publish_tools")
2652
2936
  return typing.cast(typing.Optional[_Tools_75b93a2a], result)
2653
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
+
2654
2953
  @builtins.property
2655
2954
  def code_artifact_options(self) -> typing.Optional[CodeArtifactOptions]:
2656
2955
  '''(experimental) Options for publishing to AWS CodeArtifact.
@@ -2662,6 +2961,18 @@ class PyPiPublishOptions(CommonPublishOptions):
2662
2961
  result = self._values.get("code_artifact_options")
2663
2962
  return typing.cast(typing.Optional[CodeArtifactOptions], result)
2664
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
+
2665
2976
  @builtins.property
2666
2977
  def twine_password_secret(self) -> typing.Optional[builtins.str]:
2667
2978
  '''(experimental) The GitHub secret which contains PyPI password.
@@ -2725,14 +3036,17 @@ class Release(
2725
3036
  *,
2726
3037
  artifacts_directory: builtins.str,
2727
3038
  branch: builtins.str,
2728
- task: _Task_9fa875b6,
2729
3039
  version_file: builtins.str,
2730
3040
  github_release: typing.Optional[builtins.bool] = None,
3041
+ task: typing.Optional[_Task_9fa875b6] = None,
3042
+ tasks: typing.Optional[typing.Sequence[_Task_9fa875b6]] = None,
2731
3043
  workflow_node_version: typing.Optional[builtins.str] = None,
2732
3044
  workflow_permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
3045
+ bump_package: typing.Optional[builtins.str] = None,
2733
3046
  jsii_release_version: typing.Optional[builtins.str] = None,
2734
3047
  major_version: typing.Optional[jsii.Number] = None,
2735
3048
  min_major_version: typing.Optional[jsii.Number] = None,
3049
+ next_version_command: typing.Optional[builtins.str] = None,
2736
3050
  npm_dist_tag: typing.Optional[builtins.str] = None,
2737
3051
  post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2738
3052
  prerelease: typing.Optional[builtins.str] = None,
@@ -2740,12 +3054,14 @@ class Release(
2740
3054
  publish_tasks: typing.Optional[builtins.bool] = None,
2741
3055
  releasable_commits: typing.Optional[_ReleasableCommits_d481ce10] = None,
2742
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,
2743
3058
  release_every_commit: typing.Optional[builtins.bool] = None,
2744
3059
  release_failure_issue: typing.Optional[builtins.bool] = None,
2745
3060
  release_failure_issue_label: typing.Optional[builtins.str] = None,
2746
3061
  release_schedule: typing.Optional[builtins.str] = None,
2747
3062
  release_tag_prefix: typing.Optional[builtins.str] = None,
2748
3063
  release_trigger: typing.Optional["ReleaseTrigger"] = None,
3064
+ release_workflow_env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
2749
3065
  release_workflow_name: typing.Optional[builtins.str] = None,
2750
3066
  release_workflow_setup_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2751
3067
  versionrc_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
@@ -2757,14 +3073,17 @@ class Release(
2757
3073
  :param scope: should be part of the project the Release belongs to.
2758
3074
  :param artifacts_directory: (experimental) A directory which will contain build artifacts. Default: "dist"
2759
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()``.
2760
- :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.
2761
3076
  :param version_file: (experimental) A name of a .json file to set the ``version`` field in after a bump.
2762
3077
  :param github_release: (experimental) Create a GitHub release for each release. Default: true
2763
- :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/*""
2764
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"
2765
3083
  :param jsii_release_version: (experimental) Version requirement of ``publib`` which is used to publish modules to npm. Default: "latest"
2766
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.
2767
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.
2768
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"
2769
3088
  :param post_build_steps: (experimental) Steps to execute after build as part of the release workflow. Default: []
2770
3089
  :param prerelease: (experimental) Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). Default: - normal semantic versions
@@ -2772,15 +3091,17 @@ class Release(
2772
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
2773
3092
  :param releasable_commits: (experimental) Find commits that should be considered releasable Used to decide if a release is required. Default: ReleasableCommits.everyCommit()
2774
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
2775
3095
  :param release_every_commit: (deprecated) Automatically release new versions every commit to one of branches in ``releaseBranches``. Default: true
2776
3096
  :param release_failure_issue: (experimental) Create a github issue on every failed publishing task. Default: false
2777
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"
2778
3098
  :param release_schedule: (deprecated) CRON schedule to trigger new releases. Default: - no scheduled releases
2779
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"
2780
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: {}
2781
3102
  :param release_workflow_name: (experimental) The name of the default release workflow. Default: "release"
2782
3103
  :param release_workflow_setup_steps: (experimental) A set of workflow steps to execute in order to setup the workflow container.
2783
- :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
2784
3105
  :param workflow_container_image: (experimental) Container image to use for GitHub workflows. Default: - default image
2785
3106
  :param workflow_runs_on: (experimental) Github Runner selection labels. Default: ["ubuntu-latest"]
2786
3107
  :param workflow_runs_on_group: (experimental) Github Runner Group selection options.
@@ -2793,14 +3114,17 @@ class Release(
2793
3114
  options = ReleaseOptions(
2794
3115
  artifacts_directory=artifacts_directory,
2795
3116
  branch=branch,
2796
- task=task,
2797
3117
  version_file=version_file,
2798
3118
  github_release=github_release,
3119
+ task=task,
3120
+ tasks=tasks,
2799
3121
  workflow_node_version=workflow_node_version,
2800
3122
  workflow_permissions=workflow_permissions,
3123
+ bump_package=bump_package,
2801
3124
  jsii_release_version=jsii_release_version,
2802
3125
  major_version=major_version,
2803
3126
  min_major_version=min_major_version,
3127
+ next_version_command=next_version_command,
2804
3128
  npm_dist_tag=npm_dist_tag,
2805
3129
  post_build_steps=post_build_steps,
2806
3130
  prerelease=prerelease,
@@ -2808,12 +3132,14 @@ class Release(
2808
3132
  publish_tasks=publish_tasks,
2809
3133
  releasable_commits=releasable_commits,
2810
3134
  release_branches=release_branches,
3135
+ release_environment=release_environment,
2811
3136
  release_every_commit=release_every_commit,
2812
3137
  release_failure_issue=release_failure_issue,
2813
3138
  release_failure_issue_label=release_failure_issue_label,
2814
3139
  release_schedule=release_schedule,
2815
3140
  release_tag_prefix=release_tag_prefix,
2816
3141
  release_trigger=release_trigger,
3142
+ release_workflow_env=release_workflow_env,
2817
3143
  release_workflow_name=release_workflow_name,
2818
3144
  release_workflow_setup_steps=release_workflow_setup_steps,
2819
3145
  versionrc_options=versionrc_options,
@@ -2844,6 +3170,7 @@ class Release(
2844
3170
  branch: builtins.str,
2845
3171
  *,
2846
3172
  major_version: jsii.Number,
3173
+ environment: typing.Optional[builtins.str] = None,
2847
3174
  min_major_version: typing.Optional[jsii.Number] = None,
2848
3175
  minor_version: typing.Optional[jsii.Number] = None,
2849
3176
  npm_dist_tag: typing.Optional[builtins.str] = None,
@@ -2859,6 +3186,7 @@ class Release(
2859
3186
 
2860
3187
  :param branch: The branch to monitor (e.g. ``main``, ``v2.x``).
2861
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
2862
3190
  :param min_major_version: (experimental) The minimum major version to release.
2863
3191
  :param minor_version: (experimental) The minor versions released from this branch.
2864
3192
  :param npm_dist_tag: (experimental) The npm distribution tag to use for this branch. Default: "latest"
@@ -2873,6 +3201,7 @@ class Release(
2873
3201
  check_type(argname="argument branch", value=branch, expected_type=type_hints["branch"])
2874
3202
  options = BranchOptions(
2875
3203
  major_version=major_version,
3204
+ environment=environment,
2876
3205
  min_major_version=min_major_version,
2877
3206
  minor_version=minor_version,
2878
3207
  npm_dist_tag=npm_dist_tag,
@@ -2947,9 +3276,11 @@ class Release(
2947
3276
  jsii_type="projen.release.ReleaseProjectOptions",
2948
3277
  jsii_struct_bases=[],
2949
3278
  name_mapping={
3279
+ "bump_package": "bumpPackage",
2950
3280
  "jsii_release_version": "jsiiReleaseVersion",
2951
3281
  "major_version": "majorVersion",
2952
3282
  "min_major_version": "minMajorVersion",
3283
+ "next_version_command": "nextVersionCommand",
2953
3284
  "npm_dist_tag": "npmDistTag",
2954
3285
  "post_build_steps": "postBuildSteps",
2955
3286
  "prerelease": "prerelease",
@@ -2957,12 +3288,14 @@ class Release(
2957
3288
  "publish_tasks": "publishTasks",
2958
3289
  "releasable_commits": "releasableCommits",
2959
3290
  "release_branches": "releaseBranches",
3291
+ "release_environment": "releaseEnvironment",
2960
3292
  "release_every_commit": "releaseEveryCommit",
2961
3293
  "release_failure_issue": "releaseFailureIssue",
2962
3294
  "release_failure_issue_label": "releaseFailureIssueLabel",
2963
3295
  "release_schedule": "releaseSchedule",
2964
3296
  "release_tag_prefix": "releaseTagPrefix",
2965
3297
  "release_trigger": "releaseTrigger",
3298
+ "release_workflow_env": "releaseWorkflowEnv",
2966
3299
  "release_workflow_name": "releaseWorkflowName",
2967
3300
  "release_workflow_setup_steps": "releaseWorkflowSetupSteps",
2968
3301
  "versionrc_options": "versionrcOptions",
@@ -2975,9 +3308,11 @@ class ReleaseProjectOptions:
2975
3308
  def __init__(
2976
3309
  self,
2977
3310
  *,
3311
+ bump_package: typing.Optional[builtins.str] = None,
2978
3312
  jsii_release_version: typing.Optional[builtins.str] = None,
2979
3313
  major_version: typing.Optional[jsii.Number] = None,
2980
3314
  min_major_version: typing.Optional[jsii.Number] = None,
3315
+ next_version_command: typing.Optional[builtins.str] = None,
2981
3316
  npm_dist_tag: typing.Optional[builtins.str] = None,
2982
3317
  post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2983
3318
  prerelease: typing.Optional[builtins.str] = None,
@@ -2985,12 +3320,14 @@ class ReleaseProjectOptions:
2985
3320
  publish_tasks: typing.Optional[builtins.bool] = None,
2986
3321
  releasable_commits: typing.Optional[_ReleasableCommits_d481ce10] = None,
2987
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,
2988
3324
  release_every_commit: typing.Optional[builtins.bool] = None,
2989
3325
  release_failure_issue: typing.Optional[builtins.bool] = None,
2990
3326
  release_failure_issue_label: typing.Optional[builtins.str] = None,
2991
3327
  release_schedule: typing.Optional[builtins.str] = None,
2992
3328
  release_tag_prefix: typing.Optional[builtins.str] = None,
2993
3329
  release_trigger: typing.Optional["ReleaseTrigger"] = None,
3330
+ release_workflow_env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
2994
3331
  release_workflow_name: typing.Optional[builtins.str] = None,
2995
3332
  release_workflow_setup_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
2996
3333
  versionrc_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
@@ -3000,9 +3337,11 @@ class ReleaseProjectOptions:
3000
3337
  ) -> None:
3001
3338
  '''(experimental) Project options for release.
3002
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"
3003
3341
  :param jsii_release_version: (experimental) Version requirement of ``publib`` which is used to publish modules to npm. Default: "latest"
3004
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.
3005
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.
3006
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"
3007
3346
  :param post_build_steps: (experimental) Steps to execute after build as part of the release workflow. Default: []
3008
3347
  :param prerelease: (experimental) Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). Default: - normal semantic versions
@@ -3010,15 +3349,17 @@ class ReleaseProjectOptions:
3010
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
3011
3350
  :param releasable_commits: (experimental) Find commits that should be considered releasable Used to decide if a release is required. Default: ReleasableCommits.everyCommit()
3012
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
3013
3353
  :param release_every_commit: (deprecated) Automatically release new versions every commit to one of branches in ``releaseBranches``. Default: true
3014
3354
  :param release_failure_issue: (experimental) Create a github issue on every failed publishing task. Default: false
3015
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"
3016
3356
  :param release_schedule: (deprecated) CRON schedule to trigger new releases. Default: - no scheduled releases
3017
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"
3018
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: {}
3019
3360
  :param release_workflow_name: (experimental) The name of the default release workflow. Default: "release"
3020
3361
  :param release_workflow_setup_steps: (experimental) A set of workflow steps to execute in order to setup the workflow container.
3021
- :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
3022
3363
  :param workflow_container_image: (experimental) Container image to use for GitHub workflows. Default: - default image
3023
3364
  :param workflow_runs_on: (experimental) Github Runner selection labels. Default: ["ubuntu-latest"]
3024
3365
  :param workflow_runs_on_group: (experimental) Github Runner Group selection options.
@@ -3029,9 +3370,11 @@ class ReleaseProjectOptions:
3029
3370
  workflow_runs_on_group = _GroupRunnerOptions_148c59c1(**workflow_runs_on_group)
3030
3371
  if __debug__:
3031
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"])
3032
3374
  check_type(argname="argument jsii_release_version", value=jsii_release_version, expected_type=type_hints["jsii_release_version"])
3033
3375
  check_type(argname="argument major_version", value=major_version, expected_type=type_hints["major_version"])
3034
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"])
3035
3378
  check_type(argname="argument npm_dist_tag", value=npm_dist_tag, expected_type=type_hints["npm_dist_tag"])
3036
3379
  check_type(argname="argument post_build_steps", value=post_build_steps, expected_type=type_hints["post_build_steps"])
3037
3380
  check_type(argname="argument prerelease", value=prerelease, expected_type=type_hints["prerelease"])
@@ -3039,12 +3382,14 @@ class ReleaseProjectOptions:
3039
3382
  check_type(argname="argument publish_tasks", value=publish_tasks, expected_type=type_hints["publish_tasks"])
3040
3383
  check_type(argname="argument releasable_commits", value=releasable_commits, expected_type=type_hints["releasable_commits"])
3041
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"])
3042
3386
  check_type(argname="argument release_every_commit", value=release_every_commit, expected_type=type_hints["release_every_commit"])
3043
3387
  check_type(argname="argument release_failure_issue", value=release_failure_issue, expected_type=type_hints["release_failure_issue"])
3044
3388
  check_type(argname="argument release_failure_issue_label", value=release_failure_issue_label, expected_type=type_hints["release_failure_issue_label"])
3045
3389
  check_type(argname="argument release_schedule", value=release_schedule, expected_type=type_hints["release_schedule"])
3046
3390
  check_type(argname="argument release_tag_prefix", value=release_tag_prefix, expected_type=type_hints["release_tag_prefix"])
3047
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"])
3048
3393
  check_type(argname="argument release_workflow_name", value=release_workflow_name, expected_type=type_hints["release_workflow_name"])
3049
3394
  check_type(argname="argument release_workflow_setup_steps", value=release_workflow_setup_steps, expected_type=type_hints["release_workflow_setup_steps"])
3050
3395
  check_type(argname="argument versionrc_options", value=versionrc_options, expected_type=type_hints["versionrc_options"])
@@ -3052,12 +3397,16 @@ class ReleaseProjectOptions:
3052
3397
  check_type(argname="argument workflow_runs_on", value=workflow_runs_on, expected_type=type_hints["workflow_runs_on"])
3053
3398
  check_type(argname="argument workflow_runs_on_group", value=workflow_runs_on_group, expected_type=type_hints["workflow_runs_on_group"])
3054
3399
  self._values: typing.Dict[builtins.str, typing.Any] = {}
3400
+ if bump_package is not None:
3401
+ self._values["bump_package"] = bump_package
3055
3402
  if jsii_release_version is not None:
3056
3403
  self._values["jsii_release_version"] = jsii_release_version
3057
3404
  if major_version is not None:
3058
3405
  self._values["major_version"] = major_version
3059
3406
  if min_major_version is not None:
3060
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
3061
3410
  if npm_dist_tag is not None:
3062
3411
  self._values["npm_dist_tag"] = npm_dist_tag
3063
3412
  if post_build_steps is not None:
@@ -3072,6 +3421,8 @@ class ReleaseProjectOptions:
3072
3421
  self._values["releasable_commits"] = releasable_commits
3073
3422
  if release_branches is not None:
3074
3423
  self._values["release_branches"] = release_branches
3424
+ if release_environment is not None:
3425
+ self._values["release_environment"] = release_environment
3075
3426
  if release_every_commit is not None:
3076
3427
  self._values["release_every_commit"] = release_every_commit
3077
3428
  if release_failure_issue is not None:
@@ -3084,6 +3435,8 @@ class ReleaseProjectOptions:
3084
3435
  self._values["release_tag_prefix"] = release_tag_prefix
3085
3436
  if release_trigger is not None:
3086
3437
  self._values["release_trigger"] = release_trigger
3438
+ if release_workflow_env is not None:
3439
+ self._values["release_workflow_env"] = release_workflow_env
3087
3440
  if release_workflow_name is not None:
3088
3441
  self._values["release_workflow_name"] = release_workflow_name
3089
3442
  if release_workflow_setup_steps is not None:
@@ -3097,6 +3450,19 @@ class ReleaseProjectOptions:
3097
3450
  if workflow_runs_on_group is not None:
3098
3451
  self._values["workflow_runs_on_group"] = workflow_runs_on_group
3099
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
+
3100
3466
  @builtins.property
3101
3467
  def jsii_release_version(self) -> typing.Optional[builtins.str]:
3102
3468
  '''(experimental) Version requirement of ``publib`` which is used to publish modules to npm.
@@ -3138,6 +3504,36 @@ class ReleaseProjectOptions:
3138
3504
  result = self._values.get("min_major_version")
3139
3505
  return typing.cast(typing.Optional[jsii.Number], result)
3140
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
+
3141
3537
  @builtins.property
3142
3538
  def npm_dist_tag(self) -> typing.Optional[builtins.str]:
3143
3539
  '''(experimental) The npmDistTag to use when publishing from the default branch.
@@ -3233,6 +3629,23 @@ class ReleaseProjectOptions:
3233
3629
  result = self._values.get("release_branches")
3234
3630
  return typing.cast(typing.Optional[typing.Mapping[builtins.str, BranchOptions]], result)
3235
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
+
3236
3649
  @builtins.property
3237
3650
  def release_every_commit(self) -> typing.Optional[builtins.bool]:
3238
3651
  '''(deprecated) Automatically release new versions every commit to one of branches in ``releaseBranches``.
@@ -3310,6 +3723,19 @@ class ReleaseProjectOptions:
3310
3723
  result = self._values.get("release_trigger")
3311
3724
  return typing.cast(typing.Optional["ReleaseTrigger"], result)
3312
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
+
3313
3739
  @builtins.property
3314
3740
  def release_workflow_name(self) -> typing.Optional[builtins.str]:
3315
3741
  '''(experimental) The name of the default release workflow.
@@ -3336,7 +3762,7 @@ class ReleaseProjectOptions:
3336
3762
  def versionrc_options(
3337
3763
  self,
3338
3764
  ) -> typing.Optional[typing.Mapping[builtins.str, typing.Any]]:
3339
- '''(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.
3340
3766
 
3341
3767
  Given values either append to default configuration or overwrite values in it.
3342
3768
 
@@ -3477,6 +3903,15 @@ class ReleaseTrigger(
3477
3903
 
3478
3904
  return typing.cast("ReleaseTrigger", jsii.sinvoke(cls, "scheduled", [options]))
3479
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
+
3480
3915
  @builtins.property
3481
3916
  @jsii.member(jsii_name="isContinuous")
3482
3917
  def is_continuous(self) -> builtins.bool:
@@ -3489,7 +3924,9 @@ class ReleaseTrigger(
3489
3924
  @builtins.property
3490
3925
  @jsii.member(jsii_name="isManual")
3491
3926
  def is_manual(self) -> builtins.bool:
3492
- '''(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``.
3493
3930
 
3494
3931
  :stability: experimental
3495
3932
  '''
@@ -3591,6 +4028,7 @@ class ScheduledReleaseOptions:
3591
4028
  jsii_type="projen.release.JsiiReleaseMaven",
3592
4029
  jsii_struct_bases=[MavenPublishOptions],
3593
4030
  name_mapping={
4031
+ "github_environment": "githubEnvironment",
3594
4032
  "post_publish_steps": "postPublishSteps",
3595
4033
  "pre_publish_steps": "prePublishSteps",
3596
4034
  "publish_tools": "publishTools",
@@ -3608,6 +4046,7 @@ class JsiiReleaseMaven(MavenPublishOptions):
3608
4046
  def __init__(
3609
4047
  self,
3610
4048
  *,
4049
+ github_environment: typing.Optional[builtins.str] = None,
3611
4050
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
3612
4051
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
3613
4052
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -3621,15 +4060,16 @@ class JsiiReleaseMaven(MavenPublishOptions):
3621
4060
  maven_username: typing.Optional[builtins.str] = None,
3622
4061
  ) -> None:
3623
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
3624
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``.
3625
- :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``.
3626
4066
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
3627
- :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
3628
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
3629
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
3630
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
3631
4071
  :param maven_repository_url: (experimental) Deployment repository when not deploying to Maven Central. Default: - not set
3632
- :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
3633
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
3634
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
3635
4075
 
@@ -3641,6 +4081,7 @@ class JsiiReleaseMaven(MavenPublishOptions):
3641
4081
  publish_tools = _Tools_75b93a2a(**publish_tools)
3642
4082
  if __debug__:
3643
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"])
3644
4085
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
3645
4086
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
3646
4087
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
@@ -3653,6 +4094,8 @@ class JsiiReleaseMaven(MavenPublishOptions):
3653
4094
  check_type(argname="argument maven_staging_profile_id", value=maven_staging_profile_id, expected_type=type_hints["maven_staging_profile_id"])
3654
4095
  check_type(argname="argument maven_username", value=maven_username, expected_type=type_hints["maven_username"])
3655
4096
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4097
+ if github_environment is not None:
4098
+ self._values["github_environment"] = github_environment
3656
4099
  if post_publish_steps is not None:
3657
4100
  self._values["post_publish_steps"] = post_publish_steps
3658
4101
  if pre_publish_steps is not None:
@@ -3676,6 +4119,22 @@ class JsiiReleaseMaven(MavenPublishOptions):
3676
4119
  if maven_username is not None:
3677
4120
  self._values["maven_username"] = maven_username
3678
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
+
3679
4138
  @builtins.property
3680
4139
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
3681
4140
  '''(experimental) Steps to execute after executing the publishing command.
@@ -3692,7 +4151,7 @@ class JsiiReleaseMaven(MavenPublishOptions):
3692
4151
 
3693
4152
  @builtins.property
3694
4153
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
3695
- '''(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.
3696
4155
 
3697
4156
  These steps are executed after ``dist/`` has been populated with the build
3698
4157
  output.
@@ -3721,7 +4180,7 @@ class JsiiReleaseMaven(MavenPublishOptions):
3721
4180
 
3722
4181
  if not set, defaults to https://oss.sonatype.org
3723
4182
 
3724
- :default: "https://oss.sonatype.org"
4183
+ :default: - "https://oss.sonatype.org" or none when publishing to Maven Central
3725
4184
 
3726
4185
  :stability: experimental
3727
4186
  '''
@@ -3787,7 +4246,9 @@ class JsiiReleaseMaven(MavenPublishOptions):
3787
4246
  def maven_server_id(self) -> typing.Optional[builtins.str]:
3788
4247
  '''(experimental) Used in maven settings for credential lookup (e.g. use github when publishing to GitHub).
3789
4248
 
3790
- :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
3791
4252
 
3792
4253
  :stability: experimental
3793
4254
  '''
@@ -3836,6 +4297,7 @@ class JsiiReleaseMaven(MavenPublishOptions):
3836
4297
  jsii_type="projen.release.JsiiReleaseNpm",
3837
4298
  jsii_struct_bases=[NpmPublishOptions],
3838
4299
  name_mapping={
4300
+ "github_environment": "githubEnvironment",
3839
4301
  "post_publish_steps": "postPublishSteps",
3840
4302
  "pre_publish_steps": "prePublishSteps",
3841
4303
  "publish_tools": "publishTools",
@@ -3844,12 +4306,14 @@ class JsiiReleaseMaven(MavenPublishOptions):
3844
4306
  "npm_provenance": "npmProvenance",
3845
4307
  "npm_token_secret": "npmTokenSecret",
3846
4308
  "registry": "registry",
4309
+ "trusted_publishing": "trustedPublishing",
3847
4310
  },
3848
4311
  )
3849
4312
  class JsiiReleaseNpm(NpmPublishOptions):
3850
4313
  def __init__(
3851
4314
  self,
3852
4315
  *,
4316
+ github_environment: typing.Optional[builtins.str] = None,
3853
4317
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
3854
4318
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
3855
4319
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -3858,16 +4322,19 @@ class JsiiReleaseNpm(NpmPublishOptions):
3858
4322
  npm_provenance: typing.Optional[builtins.bool] = None,
3859
4323
  npm_token_secret: typing.Optional[builtins.str] = None,
3860
4324
  registry: typing.Optional[builtins.str] = None,
4325
+ trusted_publishing: typing.Optional[builtins.bool] = None,
3861
4326
  ) -> None:
3862
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
3863
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``.
3864
- :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``.
3865
4331
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
3866
- :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
3867
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"
3868
- :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. Default: - undefined
3869
- :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``.
3870
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
3871
4338
 
3872
4339
  :deprecated: Use ``NpmPublishOptions`` instead.
3873
4340
 
@@ -3879,6 +4346,7 @@ class JsiiReleaseNpm(NpmPublishOptions):
3879
4346
  code_artifact_options = CodeArtifactOptions(**code_artifact_options)
3880
4347
  if __debug__:
3881
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"])
3882
4350
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
3883
4351
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
3884
4352
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
@@ -3887,7 +4355,10 @@ class JsiiReleaseNpm(NpmPublishOptions):
3887
4355
  check_type(argname="argument npm_provenance", value=npm_provenance, expected_type=type_hints["npm_provenance"])
3888
4356
  check_type(argname="argument npm_token_secret", value=npm_token_secret, expected_type=type_hints["npm_token_secret"])
3889
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"])
3890
4359
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4360
+ if github_environment is not None:
4361
+ self._values["github_environment"] = github_environment
3891
4362
  if post_publish_steps is not None:
3892
4363
  self._values["post_publish_steps"] = post_publish_steps
3893
4364
  if pre_publish_steps is not None:
@@ -3904,6 +4375,24 @@ class JsiiReleaseNpm(NpmPublishOptions):
3904
4375
  self._values["npm_token_secret"] = npm_token_secret
3905
4376
  if registry is not None:
3906
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)
3907
4396
 
3908
4397
  @builtins.property
3909
4398
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
@@ -3921,7 +4410,7 @@ class JsiiReleaseNpm(NpmPublishOptions):
3921
4410
 
3922
4411
  @builtins.property
3923
4412
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
3924
- '''(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.
3925
4414
 
3926
4415
  These steps are executed after ``dist/`` has been populated with the build
3927
4416
  output.
@@ -3948,7 +4437,7 @@ class JsiiReleaseNpm(NpmPublishOptions):
3948
4437
  def code_artifact_options(self) -> typing.Optional[CodeArtifactOptions]:
3949
4438
  '''(experimental) Options for publishing npm package to AWS CodeArtifact.
3950
4439
 
3951
- :default: - undefined
4440
+ :default: - package is not published to
3952
4441
 
3953
4442
  :stability: experimental
3954
4443
  '''
@@ -3986,7 +4475,9 @@ class JsiiReleaseNpm(NpmPublishOptions):
3986
4475
  Note that this component is using ``publib`` to publish packages,
3987
4476
  which is using npm internally and supports provenance statements independently of the package manager used.
3988
4477
 
3989
- :default: - undefined
4478
+ Only works in supported CI/CD environments.
4479
+
4480
+ :default: - enabled for for public packages using trusted publishing, disabled otherwise
3990
4481
 
3991
4482
  :see: https://docs.npmjs.com/generating-provenance-statements
3992
4483
  :stability: experimental
@@ -3996,7 +4487,7 @@ class JsiiReleaseNpm(NpmPublishOptions):
3996
4487
 
3997
4488
  @builtins.property
3998
4489
  def npm_token_secret(self) -> typing.Optional[builtins.str]:
3999
- '''(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.
4000
4491
 
4001
4492
  :default: - "NPM_TOKEN" or "GITHUB_TOKEN" if ``registry`` is set to ``npm.pkg.github.com``.
4002
4493
 
@@ -4026,6 +4517,21 @@ class JsiiReleaseNpm(NpmPublishOptions):
4026
4517
  result = self._values.get("registry")
4027
4518
  return typing.cast(typing.Optional[builtins.str], result)
4028
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
+
4029
4535
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
4030
4536
  return isinstance(rhs, self.__class__) and rhs._values == self._values
4031
4537
 
@@ -4042,29 +4548,38 @@ class JsiiReleaseNpm(NpmPublishOptions):
4042
4548
  jsii_type="projen.release.JsiiReleaseNuget",
4043
4549
  jsii_struct_bases=[NugetPublishOptions],
4044
4550
  name_mapping={
4551
+ "github_environment": "githubEnvironment",
4045
4552
  "post_publish_steps": "postPublishSteps",
4046
4553
  "pre_publish_steps": "prePublishSteps",
4047
4554
  "publish_tools": "publishTools",
4048
4555
  "nuget_api_key_secret": "nugetApiKeySecret",
4049
4556
  "nuget_server": "nugetServer",
4557
+ "nuget_username_secret": "nugetUsernameSecret",
4558
+ "trusted_publishing": "trustedPublishing",
4050
4559
  },
4051
4560
  )
4052
4561
  class JsiiReleaseNuget(NugetPublishOptions):
4053
4562
  def __init__(
4054
4563
  self,
4055
4564
  *,
4565
+ github_environment: typing.Optional[builtins.str] = None,
4056
4566
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4057
4567
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4058
4568
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
4059
4569
  nuget_api_key_secret: typing.Optional[builtins.str] = None,
4060
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,
4061
4573
  ) -> None:
4062
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
4063
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``.
4064
- :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``.
4065
4578
  :param publish_tools: (experimental) Additional tools to install in the publishing job. Default: - no additional tools are installed
4066
4579
  :param nuget_api_key_secret: (experimental) GitHub secret which contains the API key for NuGet. Default: "NUGET_API_KEY"
4067
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.
4068
4583
 
4069
4584
  :deprecated: Use ``NugetPublishOptions`` instead.
4070
4585
 
@@ -4074,12 +4589,17 @@ class JsiiReleaseNuget(NugetPublishOptions):
4074
4589
  publish_tools = _Tools_75b93a2a(**publish_tools)
4075
4590
  if __debug__:
4076
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"])
4077
4593
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
4078
4594
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
4079
4595
  check_type(argname="argument publish_tools", value=publish_tools, expected_type=type_hints["publish_tools"])
4080
4596
  check_type(argname="argument nuget_api_key_secret", value=nuget_api_key_secret, expected_type=type_hints["nuget_api_key_secret"])
4081
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"])
4082
4600
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4601
+ if github_environment is not None:
4602
+ self._values["github_environment"] = github_environment
4083
4603
  if post_publish_steps is not None:
4084
4604
  self._values["post_publish_steps"] = post_publish_steps
4085
4605
  if pre_publish_steps is not None:
@@ -4090,6 +4610,26 @@ class JsiiReleaseNuget(NugetPublishOptions):
4090
4610
  self._values["nuget_api_key_secret"] = nuget_api_key_secret
4091
4611
  if nuget_server is not None:
4092
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)
4093
4633
 
4094
4634
  @builtins.property
4095
4635
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
@@ -4107,7 +4647,7 @@ class JsiiReleaseNuget(NugetPublishOptions):
4107
4647
 
4108
4648
  @builtins.property
4109
4649
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
4110
- '''(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.
4111
4651
 
4112
4652
  These steps are executed after ``dist/`` has been populated with the build
4113
4653
  output.
@@ -4150,6 +4690,31 @@ class JsiiReleaseNuget(NugetPublishOptions):
4150
4690
  result = self._values.get("nuget_server")
4151
4691
  return typing.cast(typing.Optional[builtins.str], result)
4152
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
+
4153
4718
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
4154
4719
  return isinstance(rhs, self.__class__) and rhs._values == self._values
4155
4720
 
@@ -4166,10 +4731,13 @@ class JsiiReleaseNuget(NugetPublishOptions):
4166
4731
  jsii_type="projen.release.JsiiReleasePyPi",
4167
4732
  jsii_struct_bases=[PyPiPublishOptions],
4168
4733
  name_mapping={
4734
+ "github_environment": "githubEnvironment",
4169
4735
  "post_publish_steps": "postPublishSteps",
4170
4736
  "pre_publish_steps": "prePublishSteps",
4171
4737
  "publish_tools": "publishTools",
4738
+ "attestations": "attestations",
4172
4739
  "code_artifact_options": "codeArtifactOptions",
4740
+ "trusted_publishing": "trustedPublishing",
4173
4741
  "twine_password_secret": "twinePasswordSecret",
4174
4742
  "twine_registry_url": "twineRegistryUrl",
4175
4743
  "twine_username_secret": "twineUsernameSecret",
@@ -4179,19 +4747,25 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4179
4747
  def __init__(
4180
4748
  self,
4181
4749
  *,
4750
+ github_environment: typing.Optional[builtins.str] = None,
4182
4751
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4183
4752
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4184
4753
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
4754
+ attestations: typing.Optional[builtins.bool] = None,
4185
4755
  code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
4756
+ trusted_publishing: typing.Optional[builtins.bool] = None,
4186
4757
  twine_password_secret: typing.Optional[builtins.str] = None,
4187
4758
  twine_registry_url: typing.Optional[builtins.str] = None,
4188
4759
  twine_username_secret: typing.Optional[builtins.str] = None,
4189
4760
  ) -> None:
4190
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
4191
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``.
4192
- :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``.
4193
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
4194
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.
4195
4769
  :param twine_password_secret: (experimental) The GitHub secret which contains PyPI password. Default: "TWINE_PASSWORD"
4196
4770
  :param twine_registry_url: (experimental) The registry url to use when releasing packages. Default: - twine default
4197
4771
  :param twine_username_secret: (experimental) The GitHub secret which contains PyPI user name. Default: "TWINE_USERNAME"
@@ -4206,22 +4780,31 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4206
4780
  code_artifact_options = CodeArtifactOptions(**code_artifact_options)
4207
4781
  if __debug__:
4208
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"])
4209
4784
  check_type(argname="argument post_publish_steps", value=post_publish_steps, expected_type=type_hints["post_publish_steps"])
4210
4785
  check_type(argname="argument pre_publish_steps", value=pre_publish_steps, expected_type=type_hints["pre_publish_steps"])
4211
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"])
4212
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"])
4213
4790
  check_type(argname="argument twine_password_secret", value=twine_password_secret, expected_type=type_hints["twine_password_secret"])
4214
4791
  check_type(argname="argument twine_registry_url", value=twine_registry_url, expected_type=type_hints["twine_registry_url"])
4215
4792
  check_type(argname="argument twine_username_secret", value=twine_username_secret, expected_type=type_hints["twine_username_secret"])
4216
4793
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4794
+ if github_environment is not None:
4795
+ self._values["github_environment"] = github_environment
4217
4796
  if post_publish_steps is not None:
4218
4797
  self._values["post_publish_steps"] = post_publish_steps
4219
4798
  if pre_publish_steps is not None:
4220
4799
  self._values["pre_publish_steps"] = pre_publish_steps
4221
4800
  if publish_tools is not None:
4222
4801
  self._values["publish_tools"] = publish_tools
4802
+ if attestations is not None:
4803
+ self._values["attestations"] = attestations
4223
4804
  if code_artifact_options is not None:
4224
4805
  self._values["code_artifact_options"] = code_artifact_options
4806
+ if trusted_publishing is not None:
4807
+ self._values["trusted_publishing"] = trusted_publishing
4225
4808
  if twine_password_secret is not None:
4226
4809
  self._values["twine_password_secret"] = twine_password_secret
4227
4810
  if twine_registry_url is not None:
@@ -4229,6 +4812,22 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4229
4812
  if twine_username_secret is not None:
4230
4813
  self._values["twine_username_secret"] = twine_username_secret
4231
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
+
4232
4831
  @builtins.property
4233
4832
  def post_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
4234
4833
  '''(experimental) Steps to execute after executing the publishing command.
@@ -4245,7 +4844,7 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4245
4844
 
4246
4845
  @builtins.property
4247
4846
  def pre_publish_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
4248
- '''(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.
4249
4848
 
4250
4849
  These steps are executed after ``dist/`` has been populated with the build
4251
4850
  output.
@@ -4268,6 +4867,21 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4268
4867
  result = self._values.get("publish_tools")
4269
4868
  return typing.cast(typing.Optional[_Tools_75b93a2a], result)
4270
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
+
4271
4885
  @builtins.property
4272
4886
  def code_artifact_options(self) -> typing.Optional[CodeArtifactOptions]:
4273
4887
  '''(experimental) Options for publishing to AWS CodeArtifact.
@@ -4279,6 +4893,18 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4279
4893
  result = self._values.get("code_artifact_options")
4280
4894
  return typing.cast(typing.Optional[CodeArtifactOptions], result)
4281
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
+
4282
4908
  @builtins.property
4283
4909
  def twine_password_secret(self) -> typing.Optional[builtins.str]:
4284
4910
  '''(experimental) The GitHub secret which contains PyPI password.
@@ -4328,9 +4954,11 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4328
4954
  jsii_type="projen.release.ReleaseOptions",
4329
4955
  jsii_struct_bases=[ReleaseProjectOptions],
4330
4956
  name_mapping={
4957
+ "bump_package": "bumpPackage",
4331
4958
  "jsii_release_version": "jsiiReleaseVersion",
4332
4959
  "major_version": "majorVersion",
4333
4960
  "min_major_version": "minMajorVersion",
4961
+ "next_version_command": "nextVersionCommand",
4334
4962
  "npm_dist_tag": "npmDistTag",
4335
4963
  "post_build_steps": "postBuildSteps",
4336
4964
  "prerelease": "prerelease",
@@ -4338,12 +4966,14 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4338
4966
  "publish_tasks": "publishTasks",
4339
4967
  "releasable_commits": "releasableCommits",
4340
4968
  "release_branches": "releaseBranches",
4969
+ "release_environment": "releaseEnvironment",
4341
4970
  "release_every_commit": "releaseEveryCommit",
4342
4971
  "release_failure_issue": "releaseFailureIssue",
4343
4972
  "release_failure_issue_label": "releaseFailureIssueLabel",
4344
4973
  "release_schedule": "releaseSchedule",
4345
4974
  "release_tag_prefix": "releaseTagPrefix",
4346
4975
  "release_trigger": "releaseTrigger",
4976
+ "release_workflow_env": "releaseWorkflowEnv",
4347
4977
  "release_workflow_name": "releaseWorkflowName",
4348
4978
  "release_workflow_setup_steps": "releaseWorkflowSetupSteps",
4349
4979
  "versionrc_options": "versionrcOptions",
@@ -4352,9 +4982,10 @@ class JsiiReleasePyPi(PyPiPublishOptions):
4352
4982
  "workflow_runs_on_group": "workflowRunsOnGroup",
4353
4983
  "artifacts_directory": "artifactsDirectory",
4354
4984
  "branch": "branch",
4355
- "task": "task",
4356
4985
  "version_file": "versionFile",
4357
4986
  "github_release": "githubRelease",
4987
+ "task": "task",
4988
+ "tasks": "tasks",
4358
4989
  "workflow_node_version": "workflowNodeVersion",
4359
4990
  "workflow_permissions": "workflowPermissions",
4360
4991
  },
@@ -4363,9 +4994,11 @@ class ReleaseOptions(ReleaseProjectOptions):
4363
4994
  def __init__(
4364
4995
  self,
4365
4996
  *,
4997
+ bump_package: typing.Optional[builtins.str] = None,
4366
4998
  jsii_release_version: typing.Optional[builtins.str] = None,
4367
4999
  major_version: typing.Optional[jsii.Number] = None,
4368
5000
  min_major_version: typing.Optional[jsii.Number] = None,
5001
+ next_version_command: typing.Optional[builtins.str] = None,
4369
5002
  npm_dist_tag: typing.Optional[builtins.str] = None,
4370
5003
  post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4371
5004
  prerelease: typing.Optional[builtins.str] = None,
@@ -4373,12 +5006,14 @@ class ReleaseOptions(ReleaseProjectOptions):
4373
5006
  publish_tasks: typing.Optional[builtins.bool] = None,
4374
5007
  releasable_commits: typing.Optional[_ReleasableCommits_d481ce10] = None,
4375
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,
4376
5010
  release_every_commit: typing.Optional[builtins.bool] = None,
4377
5011
  release_failure_issue: typing.Optional[builtins.bool] = None,
4378
5012
  release_failure_issue_label: typing.Optional[builtins.str] = None,
4379
5013
  release_schedule: typing.Optional[builtins.str] = None,
4380
5014
  release_tag_prefix: typing.Optional[builtins.str] = None,
4381
5015
  release_trigger: typing.Optional[ReleaseTrigger] = None,
5016
+ release_workflow_env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
4382
5017
  release_workflow_name: typing.Optional[builtins.str] = None,
4383
5018
  release_workflow_setup_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4384
5019
  versionrc_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
@@ -4387,17 +5022,20 @@ class ReleaseOptions(ReleaseProjectOptions):
4387
5022
  workflow_runs_on_group: typing.Optional[typing.Union[_GroupRunnerOptions_148c59c1, typing.Dict[builtins.str, typing.Any]]] = None,
4388
5023
  artifacts_directory: builtins.str,
4389
5024
  branch: builtins.str,
4390
- task: _Task_9fa875b6,
4391
5025
  version_file: builtins.str,
4392
5026
  github_release: typing.Optional[builtins.bool] = None,
5027
+ task: typing.Optional[_Task_9fa875b6] = None,
5028
+ tasks: typing.Optional[typing.Sequence[_Task_9fa875b6]] = None,
4393
5029
  workflow_node_version: typing.Optional[builtins.str] = None,
4394
5030
  workflow_permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
4395
5031
  ) -> None:
4396
5032
  '''(experimental) Options for ``Release``.
4397
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"
4398
5035
  :param jsii_release_version: (experimental) Version requirement of ``publib`` which is used to publish modules to npm. Default: "latest"
4399
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.
4400
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.
4401
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"
4402
5040
  :param post_build_steps: (experimental) Steps to execute after build as part of the release workflow. Default: []
4403
5041
  :param prerelease: (experimental) Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). Default: - normal semantic versions
@@ -4405,24 +5043,27 @@ class ReleaseOptions(ReleaseProjectOptions):
4405
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
4406
5044
  :param releasable_commits: (experimental) Find commits that should be considered releasable Used to decide if a release is required. Default: ReleasableCommits.everyCommit()
4407
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
4408
5047
  :param release_every_commit: (deprecated) Automatically release new versions every commit to one of branches in ``releaseBranches``. Default: true
4409
5048
  :param release_failure_issue: (experimental) Create a github issue on every failed publishing task. Default: false
4410
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"
4411
5050
  :param release_schedule: (deprecated) CRON schedule to trigger new releases. Default: - no scheduled releases
4412
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"
4413
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: {}
4414
5054
  :param release_workflow_name: (experimental) The name of the default release workflow. Default: "release"
4415
5055
  :param release_workflow_setup_steps: (experimental) A set of workflow steps to execute in order to setup the workflow container.
4416
- :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
4417
5057
  :param workflow_container_image: (experimental) Container image to use for GitHub workflows. Default: - default image
4418
5058
  :param workflow_runs_on: (experimental) Github Runner selection labels. Default: ["ubuntu-latest"]
4419
5059
  :param workflow_runs_on_group: (experimental) Github Runner Group selection options.
4420
5060
  :param artifacts_directory: (experimental) A directory which will contain build artifacts. Default: "dist"
4421
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()``.
4422
- :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.
4423
5062
  :param version_file: (experimental) A name of a .json file to set the ``version`` field in after a bump.
4424
5063
  :param github_release: (experimental) Create a GitHub release for each release. Default: true
4425
- :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/*""
4426
5067
  :param workflow_permissions: (experimental) Permissions granted to the release workflow job. Default: ``{ contents: JobPermission.WRITE }``
4427
5068
 
4428
5069
  :stability: experimental
@@ -4433,9 +5074,11 @@ class ReleaseOptions(ReleaseProjectOptions):
4433
5074
  workflow_permissions = _JobPermissions_3b5b53dc(**workflow_permissions)
4434
5075
  if __debug__:
4435
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"])
4436
5078
  check_type(argname="argument jsii_release_version", value=jsii_release_version, expected_type=type_hints["jsii_release_version"])
4437
5079
  check_type(argname="argument major_version", value=major_version, expected_type=type_hints["major_version"])
4438
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"])
4439
5082
  check_type(argname="argument npm_dist_tag", value=npm_dist_tag, expected_type=type_hints["npm_dist_tag"])
4440
5083
  check_type(argname="argument post_build_steps", value=post_build_steps, expected_type=type_hints["post_build_steps"])
4441
5084
  check_type(argname="argument prerelease", value=prerelease, expected_type=type_hints["prerelease"])
@@ -4443,12 +5086,14 @@ class ReleaseOptions(ReleaseProjectOptions):
4443
5086
  check_type(argname="argument publish_tasks", value=publish_tasks, expected_type=type_hints["publish_tasks"])
4444
5087
  check_type(argname="argument releasable_commits", value=releasable_commits, expected_type=type_hints["releasable_commits"])
4445
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"])
4446
5090
  check_type(argname="argument release_every_commit", value=release_every_commit, expected_type=type_hints["release_every_commit"])
4447
5091
  check_type(argname="argument release_failure_issue", value=release_failure_issue, expected_type=type_hints["release_failure_issue"])
4448
5092
  check_type(argname="argument release_failure_issue_label", value=release_failure_issue_label, expected_type=type_hints["release_failure_issue_label"])
4449
5093
  check_type(argname="argument release_schedule", value=release_schedule, expected_type=type_hints["release_schedule"])
4450
5094
  check_type(argname="argument release_tag_prefix", value=release_tag_prefix, expected_type=type_hints["release_tag_prefix"])
4451
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"])
4452
5097
  check_type(argname="argument release_workflow_name", value=release_workflow_name, expected_type=type_hints["release_workflow_name"])
4453
5098
  check_type(argname="argument release_workflow_setup_steps", value=release_workflow_setup_steps, expected_type=type_hints["release_workflow_setup_steps"])
4454
5099
  check_type(argname="argument versionrc_options", value=versionrc_options, expected_type=type_hints["versionrc_options"])
@@ -4457,23 +5102,27 @@ class ReleaseOptions(ReleaseProjectOptions):
4457
5102
  check_type(argname="argument workflow_runs_on_group", value=workflow_runs_on_group, expected_type=type_hints["workflow_runs_on_group"])
4458
5103
  check_type(argname="argument artifacts_directory", value=artifacts_directory, expected_type=type_hints["artifacts_directory"])
4459
5104
  check_type(argname="argument branch", value=branch, expected_type=type_hints["branch"])
4460
- check_type(argname="argument task", value=task, expected_type=type_hints["task"])
4461
5105
  check_type(argname="argument version_file", value=version_file, expected_type=type_hints["version_file"])
4462
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"])
4463
5109
  check_type(argname="argument workflow_node_version", value=workflow_node_version, expected_type=type_hints["workflow_node_version"])
4464
5110
  check_type(argname="argument workflow_permissions", value=workflow_permissions, expected_type=type_hints["workflow_permissions"])
4465
5111
  self._values: typing.Dict[builtins.str, typing.Any] = {
4466
5112
  "artifacts_directory": artifacts_directory,
4467
5113
  "branch": branch,
4468
- "task": task,
4469
5114
  "version_file": version_file,
4470
5115
  }
5116
+ if bump_package is not None:
5117
+ self._values["bump_package"] = bump_package
4471
5118
  if jsii_release_version is not None:
4472
5119
  self._values["jsii_release_version"] = jsii_release_version
4473
5120
  if major_version is not None:
4474
5121
  self._values["major_version"] = major_version
4475
5122
  if min_major_version is not None:
4476
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
4477
5126
  if npm_dist_tag is not None:
4478
5127
  self._values["npm_dist_tag"] = npm_dist_tag
4479
5128
  if post_build_steps is not None:
@@ -4488,6 +5137,8 @@ class ReleaseOptions(ReleaseProjectOptions):
4488
5137
  self._values["releasable_commits"] = releasable_commits
4489
5138
  if release_branches is not None:
4490
5139
  self._values["release_branches"] = release_branches
5140
+ if release_environment is not None:
5141
+ self._values["release_environment"] = release_environment
4491
5142
  if release_every_commit is not None:
4492
5143
  self._values["release_every_commit"] = release_every_commit
4493
5144
  if release_failure_issue is not None:
@@ -4500,6 +5151,8 @@ class ReleaseOptions(ReleaseProjectOptions):
4500
5151
  self._values["release_tag_prefix"] = release_tag_prefix
4501
5152
  if release_trigger is not None:
4502
5153
  self._values["release_trigger"] = release_trigger
5154
+ if release_workflow_env is not None:
5155
+ self._values["release_workflow_env"] = release_workflow_env
4503
5156
  if release_workflow_name is not None:
4504
5157
  self._values["release_workflow_name"] = release_workflow_name
4505
5158
  if release_workflow_setup_steps is not None:
@@ -4514,11 +5167,28 @@ class ReleaseOptions(ReleaseProjectOptions):
4514
5167
  self._values["workflow_runs_on_group"] = workflow_runs_on_group
4515
5168
  if github_release is not None:
4516
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
4517
5174
  if workflow_node_version is not None:
4518
5175
  self._values["workflow_node_version"] = workflow_node_version
4519
5176
  if workflow_permissions is not None:
4520
5177
  self._values["workflow_permissions"] = workflow_permissions
4521
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
+
4522
5192
  @builtins.property
4523
5193
  def jsii_release_version(self) -> typing.Optional[builtins.str]:
4524
5194
  '''(experimental) Version requirement of ``publib`` which is used to publish modules to npm.
@@ -4560,6 +5230,36 @@ class ReleaseOptions(ReleaseProjectOptions):
4560
5230
  result = self._values.get("min_major_version")
4561
5231
  return typing.cast(typing.Optional[jsii.Number], result)
4562
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
+
4563
5263
  @builtins.property
4564
5264
  def npm_dist_tag(self) -> typing.Optional[builtins.str]:
4565
5265
  '''(experimental) The npmDistTag to use when publishing from the default branch.
@@ -4655,6 +5355,23 @@ class ReleaseOptions(ReleaseProjectOptions):
4655
5355
  result = self._values.get("release_branches")
4656
5356
  return typing.cast(typing.Optional[typing.Mapping[builtins.str, BranchOptions]], result)
4657
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
+
4658
5375
  @builtins.property
4659
5376
  def release_every_commit(self) -> typing.Optional[builtins.bool]:
4660
5377
  '''(deprecated) Automatically release new versions every commit to one of branches in ``releaseBranches``.
@@ -4732,6 +5449,19 @@ class ReleaseOptions(ReleaseProjectOptions):
4732
5449
  result = self._values.get("release_trigger")
4733
5450
  return typing.cast(typing.Optional[ReleaseTrigger], result)
4734
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
+
4735
5465
  @builtins.property
4736
5466
  def release_workflow_name(self) -> typing.Optional[builtins.str]:
4737
5467
  '''(experimental) The name of the default release workflow.
@@ -4758,7 +5488,7 @@ class ReleaseOptions(ReleaseProjectOptions):
4758
5488
  def versionrc_options(
4759
5489
  self,
4760
5490
  ) -> typing.Optional[typing.Mapping[builtins.str, typing.Any]]:
4761
- '''(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.
4762
5492
 
4763
5493
  Given values either append to default configuration or overwrite values in it.
4764
5494
 
@@ -4831,20 +5561,6 @@ class ReleaseOptions(ReleaseProjectOptions):
4831
5561
  assert result is not None, "Required property 'branch' is missing"
4832
5562
  return typing.cast(builtins.str, result)
4833
5563
 
4834
- @builtins.property
4835
- def task(self) -> _Task_9fa875b6:
4836
- '''(experimental) The task to execute in order to create the release artifacts.
4837
-
4838
- Artifacts are
4839
- expected to reside under ``artifactsDirectory`` (defaults to ``dist/``) once
4840
- build is complete.
4841
-
4842
- :stability: experimental
4843
- '''
4844
- result = self._values.get("task")
4845
- assert result is not None, "Required property 'task' is missing"
4846
- return typing.cast(_Task_9fa875b6, result)
4847
-
4848
5564
  @builtins.property
4849
5565
  def version_file(self) -> builtins.str:
4850
5566
  '''(experimental) A name of a .json file to set the ``version`` field in after a bump.
@@ -4870,6 +5586,34 @@ class ReleaseOptions(ReleaseProjectOptions):
4870
5586
  result = self._values.get("github_release")
4871
5587
  return typing.cast(typing.Optional[builtins.bool], result)
4872
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
+
4873
5617
  @builtins.property
4874
5618
  def workflow_node_version(self) -> typing.Optional[builtins.str]:
4875
5619
  '''(experimental) Node version to setup in GitHub workflows if any node-based CLI utilities are needed.
@@ -4877,7 +5621,7 @@ class ReleaseOptions(ReleaseProjectOptions):
4877
5621
  For example ``publib``, the CLI projen uses to publish releases,
4878
5622
  is an npm library.
4879
5623
 
4880
- :default: 18.x
5624
+ :default: "lts/*""
4881
5625
 
4882
5626
  :stability: experimental
4883
5627
  '''
@@ -4940,6 +5684,7 @@ publication.publish()
4940
5684
  def _typecheckingstub__6f62eb98000deee3820f046309b2262c5063c0cb9581232fd1a44731f86986d7(
4941
5685
  *,
4942
5686
  major_version: jsii.Number,
5687
+ environment: typing.Optional[builtins.str] = None,
4943
5688
  min_major_version: typing.Optional[jsii.Number] = None,
4944
5689
  minor_version: typing.Optional[jsii.Number] = None,
4945
5690
  npm_dist_tag: typing.Optional[builtins.str] = None,
@@ -4962,6 +5707,7 @@ def _typecheckingstub__9a328fe64db40633fedae889a7376e6885e1983f57d171d4f4ef85af6
4962
5707
 
4963
5708
  def _typecheckingstub__9603f09b67279d5ef3dc921367168d873983210161b1d6382c369d0b9ec13b0a(
4964
5709
  *,
5710
+ github_environment: typing.Optional[builtins.str] = None,
4965
5711
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4966
5712
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4967
5713
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -4978,6 +5724,7 @@ def _typecheckingstub__95b36779f92c5190c3ac9d8a636a537bfe6ebc844a55942ee5dfc0a96
4978
5724
 
4979
5725
  def _typecheckingstub__c7008ba35b00dedc375d87db7a317e8f077475b6a4e334303337c92bb77171fb(
4980
5726
  *,
5727
+ github_environment: typing.Optional[builtins.str] = None,
4981
5728
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4982
5729
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
4983
5730
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -5002,13 +5749,13 @@ def _typecheckingstub__d5537e1435c9eea568279fa140de950e1b7275db307b3741959861863
5002
5749
 
5003
5750
  def _typecheckingstub__81a5b8a4f17bcea99089b42477d5b778fd3a9066d3d1126736ccf21a9c44bfbc(
5004
5751
  *,
5752
+ github_environment: typing.Optional[builtins.str] = None,
5005
5753
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5006
5754
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5007
5755
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
5008
5756
  git_branch: typing.Optional[builtins.str] = None,
5009
5757
  git_commit_message: typing.Optional[builtins.str] = None,
5010
5758
  github_deploy_key_secret: typing.Optional[builtins.str] = None,
5011
- github_repo: typing.Optional[builtins.str] = None,
5012
5759
  github_token_secret: typing.Optional[builtins.str] = None,
5013
5760
  github_use_ssh: typing.Optional[builtins.bool] = None,
5014
5761
  git_user_email: typing.Optional[builtins.str] = None,
@@ -5019,13 +5766,13 @@ def _typecheckingstub__81a5b8a4f17bcea99089b42477d5b778fd3a9066d3d1126736ccf21a9
5019
5766
 
5020
5767
  def _typecheckingstub__44bae65cd3313afa37ada6dbaab99141ff7744458e985bc9c53faa021220e167(
5021
5768
  *,
5769
+ github_environment: typing.Optional[builtins.str] = None,
5022
5770
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5023
5771
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5024
5772
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
5025
5773
  git_branch: typing.Optional[builtins.str] = None,
5026
5774
  git_commit_message: typing.Optional[builtins.str] = None,
5027
5775
  github_deploy_key_secret: typing.Optional[builtins.str] = None,
5028
- github_repo: typing.Optional[builtins.str] = None,
5029
5776
  github_token_secret: typing.Optional[builtins.str] = None,
5030
5777
  github_use_ssh: typing.Optional[builtins.bool] = None,
5031
5778
  git_user_email: typing.Optional[builtins.str] = None,
@@ -5045,6 +5792,7 @@ def _typecheckingstub__2492d83058b766179e85fd785d08928e38b53ce70b0f2dc9a1c5edccb
5045
5792
 
5046
5793
  def _typecheckingstub__da2d55bfa47dd9e6869b7f55b573dea54539ab2e9b833766e4140d6d4c4c3d7e(
5047
5794
  *,
5795
+ github_environment: typing.Optional[builtins.str] = None,
5048
5796
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5049
5797
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5050
5798
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -5062,6 +5810,7 @@ def _typecheckingstub__da2d55bfa47dd9e6869b7f55b573dea54539ab2e9b833766e4140d6d4
5062
5810
 
5063
5811
  def _typecheckingstub__458289050585e6e895f9ee709ee4e102166b0f71e3c8b2a0617efa2d24e990fb(
5064
5812
  *,
5813
+ github_environment: typing.Optional[builtins.str] = None,
5065
5814
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5066
5815
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5067
5816
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -5070,17 +5819,21 @@ def _typecheckingstub__458289050585e6e895f9ee709ee4e102166b0f71e3c8b2a0617efa2d2
5070
5819
  npm_provenance: typing.Optional[builtins.bool] = None,
5071
5820
  npm_token_secret: typing.Optional[builtins.str] = None,
5072
5821
  registry: typing.Optional[builtins.str] = None,
5822
+ trusted_publishing: typing.Optional[builtins.bool] = None,
5073
5823
  ) -> None:
5074
5824
  """Type checking stubs"""
5075
5825
  pass
5076
5826
 
5077
5827
  def _typecheckingstub__584d4125e43e970396e9062b357de30ef32a6d1b30bd3a0f00fc7db041ea0bec(
5078
5828
  *,
5829
+ github_environment: typing.Optional[builtins.str] = None,
5079
5830
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5080
5831
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5081
5832
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
5082
5833
  nuget_api_key_secret: typing.Optional[builtins.str] = None,
5083
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,
5084
5837
  ) -> None:
5085
5838
  """Type checking stubs"""
5086
5839
  pass
@@ -5138,10 +5891,13 @@ def _typecheckingstub__4e430972b008e5968049196f964ee9dfa036c68b2195f125119bc2629
5138
5891
 
5139
5892
  def _typecheckingstub__f90cd44def59be822b686bcd759d7f0a910b9936ca8acc0ef3e69cda5ddc21d2(
5140
5893
  *,
5894
+ github_environment: typing.Optional[builtins.str] = None,
5141
5895
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5142
5896
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5143
5897
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
5898
+ attestations: typing.Optional[builtins.bool] = None,
5144
5899
  code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
5900
+ trusted_publishing: typing.Optional[builtins.bool] = None,
5145
5901
  twine_password_secret: typing.Optional[builtins.str] = None,
5146
5902
  twine_registry_url: typing.Optional[builtins.str] = None,
5147
5903
  twine_username_secret: typing.Optional[builtins.str] = None,
@@ -5154,14 +5910,17 @@ def _typecheckingstub__b447ecb34d36869391ee159467e6c78b74da704722d4c6a517e05bbae
5154
5910
  *,
5155
5911
  artifacts_directory: builtins.str,
5156
5912
  branch: builtins.str,
5157
- task: _Task_9fa875b6,
5158
5913
  version_file: builtins.str,
5159
5914
  github_release: typing.Optional[builtins.bool] = None,
5915
+ task: typing.Optional[_Task_9fa875b6] = None,
5916
+ tasks: typing.Optional[typing.Sequence[_Task_9fa875b6]] = None,
5160
5917
  workflow_node_version: typing.Optional[builtins.str] = None,
5161
5918
  workflow_permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
5919
+ bump_package: typing.Optional[builtins.str] = None,
5162
5920
  jsii_release_version: typing.Optional[builtins.str] = None,
5163
5921
  major_version: typing.Optional[jsii.Number] = None,
5164
5922
  min_major_version: typing.Optional[jsii.Number] = None,
5923
+ next_version_command: typing.Optional[builtins.str] = None,
5165
5924
  npm_dist_tag: typing.Optional[builtins.str] = None,
5166
5925
  post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5167
5926
  prerelease: typing.Optional[builtins.str] = None,
@@ -5169,12 +5928,14 @@ def _typecheckingstub__b447ecb34d36869391ee159467e6c78b74da704722d4c6a517e05bbae
5169
5928
  publish_tasks: typing.Optional[builtins.bool] = None,
5170
5929
  releasable_commits: typing.Optional[_ReleasableCommits_d481ce10] = None,
5171
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,
5172
5932
  release_every_commit: typing.Optional[builtins.bool] = None,
5173
5933
  release_failure_issue: typing.Optional[builtins.bool] = None,
5174
5934
  release_failure_issue_label: typing.Optional[builtins.str] = None,
5175
5935
  release_schedule: typing.Optional[builtins.str] = None,
5176
5936
  release_tag_prefix: typing.Optional[builtins.str] = None,
5177
5937
  release_trigger: typing.Optional[ReleaseTrigger] = None,
5938
+ release_workflow_env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
5178
5939
  release_workflow_name: typing.Optional[builtins.str] = None,
5179
5940
  release_workflow_setup_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5180
5941
  versionrc_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
@@ -5195,6 +5956,7 @@ def _typecheckingstub__e0f66d9106b15a88644bb5efb62c4d4d18bb7c7b73bb22b904010a8a6
5195
5956
  branch: builtins.str,
5196
5957
  *,
5197
5958
  major_version: jsii.Number,
5959
+ environment: typing.Optional[builtins.str] = None,
5198
5960
  min_major_version: typing.Optional[jsii.Number] = None,
5199
5961
  minor_version: typing.Optional[jsii.Number] = None,
5200
5962
  npm_dist_tag: typing.Optional[builtins.str] = None,
@@ -5213,9 +5975,11 @@ def _typecheckingstub__e8df2839c98abec4e8a1e84ad0fc953b4051cdf361a30544804281bc9
5213
5975
 
5214
5976
  def _typecheckingstub__cc5e99254de9f29d2ac3b86e193164816e1ed36e491e602128e7d16fb86aa377(
5215
5977
  *,
5978
+ bump_package: typing.Optional[builtins.str] = None,
5216
5979
  jsii_release_version: typing.Optional[builtins.str] = None,
5217
5980
  major_version: typing.Optional[jsii.Number] = None,
5218
5981
  min_major_version: typing.Optional[jsii.Number] = None,
5982
+ next_version_command: typing.Optional[builtins.str] = None,
5219
5983
  npm_dist_tag: typing.Optional[builtins.str] = None,
5220
5984
  post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5221
5985
  prerelease: typing.Optional[builtins.str] = None,
@@ -5223,12 +5987,14 @@ def _typecheckingstub__cc5e99254de9f29d2ac3b86e193164816e1ed36e491e602128e7d16fb
5223
5987
  publish_tasks: typing.Optional[builtins.bool] = None,
5224
5988
  releasable_commits: typing.Optional[_ReleasableCommits_d481ce10] = None,
5225
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,
5226
5991
  release_every_commit: typing.Optional[builtins.bool] = None,
5227
5992
  release_failure_issue: typing.Optional[builtins.bool] = None,
5228
5993
  release_failure_issue_label: typing.Optional[builtins.str] = None,
5229
5994
  release_schedule: typing.Optional[builtins.str] = None,
5230
5995
  release_tag_prefix: typing.Optional[builtins.str] = None,
5231
5996
  release_trigger: typing.Optional[ReleaseTrigger] = None,
5997
+ release_workflow_env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
5232
5998
  release_workflow_name: typing.Optional[builtins.str] = None,
5233
5999
  release_workflow_setup_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5234
6000
  versionrc_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
@@ -5248,6 +6014,7 @@ def _typecheckingstub__629cc7488dbd6e87168962d964694e088625a8e208d09e45c120eac7e
5248
6014
 
5249
6015
  def _typecheckingstub__370b478ebba8352e12c41a67b57d5954055dba8a6ceae59144e72607fdc6df41(
5250
6016
  *,
6017
+ github_environment: typing.Optional[builtins.str] = None,
5251
6018
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5252
6019
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5253
6020
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -5265,6 +6032,7 @@ def _typecheckingstub__370b478ebba8352e12c41a67b57d5954055dba8a6ceae59144e72607f
5265
6032
 
5266
6033
  def _typecheckingstub__a34680d3cf9e2cc6374987796717402a524a0bb377e9172f0707da67450b3239(
5267
6034
  *,
6035
+ github_environment: typing.Optional[builtins.str] = None,
5268
6036
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5269
6037
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5270
6038
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -5273,27 +6041,34 @@ def _typecheckingstub__a34680d3cf9e2cc6374987796717402a524a0bb377e9172f0707da674
5273
6041
  npm_provenance: typing.Optional[builtins.bool] = None,
5274
6042
  npm_token_secret: typing.Optional[builtins.str] = None,
5275
6043
  registry: typing.Optional[builtins.str] = None,
6044
+ trusted_publishing: typing.Optional[builtins.bool] = None,
5276
6045
  ) -> None:
5277
6046
  """Type checking stubs"""
5278
6047
  pass
5279
6048
 
5280
6049
  def _typecheckingstub__14abe6d299c2354a8f22a08788f088aafaa8acf2b85b20f297416346274a9b96(
5281
6050
  *,
6051
+ github_environment: typing.Optional[builtins.str] = None,
5282
6052
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5283
6053
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5284
6054
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
5285
6055
  nuget_api_key_secret: typing.Optional[builtins.str] = None,
5286
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,
5287
6059
  ) -> None:
5288
6060
  """Type checking stubs"""
5289
6061
  pass
5290
6062
 
5291
6063
  def _typecheckingstub__0fa7c01cc40634bf771011bf4e8ddb9e3be28efd1b3f15b5d0768a4e810d37bc(
5292
6064
  *,
6065
+ github_environment: typing.Optional[builtins.str] = None,
5293
6066
  post_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5294
6067
  pre_publish_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5295
6068
  publish_tools: typing.Optional[typing.Union[_Tools_75b93a2a, typing.Dict[builtins.str, typing.Any]]] = None,
6069
+ attestations: typing.Optional[builtins.bool] = None,
5296
6070
  code_artifact_options: typing.Optional[typing.Union[CodeArtifactOptions, typing.Dict[builtins.str, typing.Any]]] = None,
6071
+ trusted_publishing: typing.Optional[builtins.bool] = None,
5297
6072
  twine_password_secret: typing.Optional[builtins.str] = None,
5298
6073
  twine_registry_url: typing.Optional[builtins.str] = None,
5299
6074
  twine_username_secret: typing.Optional[builtins.str] = None,
@@ -5303,9 +6078,11 @@ def _typecheckingstub__0fa7c01cc40634bf771011bf4e8ddb9e3be28efd1b3f15b5d0768a4e8
5303
6078
 
5304
6079
  def _typecheckingstub__abcbb9106f2fe858c4efa7a5934906e63b00b56fa33c47c5f910dac2a904f472(
5305
6080
  *,
6081
+ bump_package: typing.Optional[builtins.str] = None,
5306
6082
  jsii_release_version: typing.Optional[builtins.str] = None,
5307
6083
  major_version: typing.Optional[jsii.Number] = None,
5308
6084
  min_major_version: typing.Optional[jsii.Number] = None,
6085
+ next_version_command: typing.Optional[builtins.str] = None,
5309
6086
  npm_dist_tag: typing.Optional[builtins.str] = None,
5310
6087
  post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5311
6088
  prerelease: typing.Optional[builtins.str] = None,
@@ -5313,12 +6090,14 @@ def _typecheckingstub__abcbb9106f2fe858c4efa7a5934906e63b00b56fa33c47c5f910dac2a
5313
6090
  publish_tasks: typing.Optional[builtins.bool] = None,
5314
6091
  releasable_commits: typing.Optional[_ReleasableCommits_d481ce10] = None,
5315
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,
5316
6094
  release_every_commit: typing.Optional[builtins.bool] = None,
5317
6095
  release_failure_issue: typing.Optional[builtins.bool] = None,
5318
6096
  release_failure_issue_label: typing.Optional[builtins.str] = None,
5319
6097
  release_schedule: typing.Optional[builtins.str] = None,
5320
6098
  release_tag_prefix: typing.Optional[builtins.str] = None,
5321
6099
  release_trigger: typing.Optional[ReleaseTrigger] = None,
6100
+ release_workflow_env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
5322
6101
  release_workflow_name: typing.Optional[builtins.str] = None,
5323
6102
  release_workflow_setup_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
5324
6103
  versionrc_options: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
@@ -5327,9 +6106,10 @@ def _typecheckingstub__abcbb9106f2fe858c4efa7a5934906e63b00b56fa33c47c5f910dac2a
5327
6106
  workflow_runs_on_group: typing.Optional[typing.Union[_GroupRunnerOptions_148c59c1, typing.Dict[builtins.str, typing.Any]]] = None,
5328
6107
  artifacts_directory: builtins.str,
5329
6108
  branch: builtins.str,
5330
- task: _Task_9fa875b6,
5331
6109
  version_file: builtins.str,
5332
6110
  github_release: typing.Optional[builtins.bool] = None,
6111
+ task: typing.Optional[_Task_9fa875b6] = None,
6112
+ tasks: typing.Optional[typing.Sequence[_Task_9fa875b6]] = None,
5333
6113
  workflow_node_version: typing.Optional[builtins.str] = None,
5334
6114
  workflow_permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
5335
6115
  ) -> None: