Class NpmPublishOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.release.NpmPublishOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<NpmPublishOptions>
- Enclosing interface:
- NpmPublishOptions
@Stability(Experimental) public static final class NpmPublishOptions.Builder extends Object implements software.amazon.jsii.Builder<NpmPublishOptions>
A builder forNpmPublishOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
codeArtifactOptions
@Stability(Experimental) public NpmPublishOptions.Builder codeArtifactOptions(CodeArtifactOptions codeArtifactOptions)
Sets the value ofNpmPublishOptions.getCodeArtifactOptions()- Parameters:
codeArtifactOptions- Options for publishing npm package to AWS CodeArtifact.- Returns:
this
-
distTag
@Stability(Deprecated) @Deprecated public NpmPublishOptions.Builder distTag(String distTag)
Deprecated.Use `npmDistTag` for each release branch instead.Sets the value ofNpmPublishOptions.getDistTag()- Parameters:
distTag- 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
latesttag is used by npm to identify the current version of a package, andnpm install <pkg>(without any@<version>or@<tag>specifier) installs the latest tag. Typically, projects only use thelatesttag for stable release versions, and use other tags for unstable versions such as prereleases.The
nexttag is used by some projects to identify the upcoming version.- Returns:
this
-
npmProvenance
@Stability(Experimental) public NpmPublishOptions.Builder npmProvenance(Boolean npmProvenance)
Sets the value ofNpmPublishOptions.getNpmProvenance()- Parameters:
npmProvenance- Should provenance statements be generated when package is published. Note that this component is usingpublibto publish packages, which is using npm internally and supports provenance statements independently of the package manager used.- Returns:
this
-
npmTokenSecret
@Stability(Experimental) public NpmPublishOptions.Builder npmTokenSecret(String npmTokenSecret)
Sets the value ofNpmPublishOptions.getNpmTokenSecret()- Parameters:
npmTokenSecret- GitHub secret which contains the NPM token to use when publishing packages.- Returns:
this
-
registry
@Stability(Experimental) public NpmPublishOptions.Builder registry(String registry)
Sets the value ofNpmPublishOptions.getRegistry()- Parameters:
registry- The domain name of the npm package registry. To publish to GitHub Packages, set this value to"npm.pkg.github.com". In this ifnpmTokenSecretis not specified, it will default toGITHUB_TOKENwhich means that you will be able to publish to the repository's package store. In this case, make surerepositoryUrlis correctly defined.- Returns:
this
-
postPublishSteps
@Stability(Experimental) public NpmPublishOptions.Builder postPublishSteps(List<? extends JobStep> postPublishSteps)
Sets the value ofCommonPublishOptions.getPostPublishSteps()- Parameters:
postPublishSteps- 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
publishToGitHubReleasesthis will override steps added viaaddGitHubPostPublishingSteps.- Returns:
this
-
prePublishSteps
@Stability(Experimental) public NpmPublishOptions.Builder prePublishSteps(List<? extends JobStep> prePublishSteps)
Sets the value ofCommonPublishOptions.getPrePublishSteps()- Parameters:
prePublishSteps- Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed afterdist/has been populated with the build output.Note that when using this in
publishToGitHubReleasesthis will override steps added viaaddGitHubPrePublishingSteps.- Returns:
this
-
publishTools
@Stability(Experimental) public NpmPublishOptions.Builder publishTools(Tools publishTools)
Sets the value ofCommonPublishOptions.getPublishTools()- Parameters:
publishTools- Additional tools to install in the publishing job.- Returns:
this
-
build
@Stability(Experimental) public NpmPublishOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<NpmPublishOptions>- Returns:
- a new instance of
NpmPublishOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-