release
Submodule
Constructs
Publisher
Implements GitHub jobs for publishing modules to package managers.
Under the hood, it uses https://github.com/aws/publib
Initializers
import { release } from 'projen'
new release.Publisher(project: Project, options: PublisherOptions)
Name | Type | Description |
---|---|---|
| projen.Project | No description. |
|
| No description. |
project
Required
- Type: projen.Project
options
Required
- Type: PublisherOptions
Methods
Name | Description |
---|---|
| Returns a string representation of this construct. |
| Called after synthesis. |
| Called before synthesis. |
| Synthesizes files to the project output directory. |
| Adds post publishing steps for the GitHub release job. |
| Adds pre publishing steps for the GitHub release job. |
| Publish to git. |
| Creates a GitHub Release. |
| Adds a go publishing job. |
| Publishes artifacts from java/** to Maven. |
| Publishes artifacts from js/** to npm. |
| Publishes artifacts from dotnet/** to NuGet Gallery. |
| Publishes wheel artifacts from python to PyPI. |
toString
public toString(): string
Returns a string representation of this construct.
postSynthesize
public postSynthesize(): void
Called after synthesis.
Order is not guaranteed.
preSynthesize
public preSynthesize(): void
Called before synthesis.
synthesize
public synthesize(): void
Synthesizes files to the project output directory.
addGitHubPostPublishingSteps
public addGitHubPostPublishingSteps(steps: JobStep): void
Adds post publishing steps for the GitHub release job.
steps
Required
- Type: projen.github.workflows.JobStep
The steps.
addGitHubPrePublishingSteps
public addGitHubPrePublishingSteps(steps: JobStep): void
Adds pre publishing steps for the GitHub release job.
steps
Required
- Type: projen.github.workflows.JobStep
The steps.
publishToGit
public publishToGit(options: GitPublishOptions): Task
Publish to git.
This includes generating a project-level changelog and release tags.
options
Required
- Type: GitPublishOptions
Options.
publishToGitHubReleases
public publishToGitHubReleases(options: GitHubReleasesPublishOptions): void
Creates a GitHub Release.
options
Required
Options.
publishToGo
public publishToGo(options?: GoPublishOptions): void
Adds a go publishing job.
options
Optional
- Type: GoPublishOptions
Options.
publishToMaven
public publishToMaven(options?: MavenPublishOptions): void
Publishes artifacts from java/**
to Maven.
options
Optional
- Type: MavenPublishOptions
Options.
publishToNpm
public publishToNpm(options?: NpmPublishOptions): void
Publishes artifacts from js/**
to npm.
options
Optional
- Type: NpmPublishOptions
Options.
publishToNuget
public publishToNuget(options?: NugetPublishOptions): void
Publishes artifacts from dotnet/**
to NuGet Gallery.
options
Optional
- Type: NugetPublishOptions
Options.
publishToPyPi
public publishToPyPi(options?: PyPiPublishOptions): void
Publishes wheel artifacts from python
to PyPI.
options
Optional
- Type: PyPiPublishOptions
Options.
Static Functions
Name | Description |
---|---|
| Checks if x is a construct. |
| Test whether the given construct is a component. |
isConstruct
import { release } from 'projen'
release.Publisher.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.