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.
x
Required
- Type: any
Any object.
isComponent
import { release } from 'projen'
release.Publisher.isComponent(x: any)
Test whether the given construct is a component.
x
Required
- Type: any
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
| projen.Project | No description. |
| string | No description. |
| string | No description. |
| string | No description. |
| string | No description. |
| string | No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
project
Required
public readonly project: Project;
- Type: projen.Project
artifactName
Required
public readonly artifactName: string;
- Type: string
buildJobId
Required
public readonly buildJobId: string;
- Type: string
jsiiReleaseVersion
Required
jsiiReleaseVersion
- Deprecated: use
publibVersion
public readonly jsiiReleaseVersion: string;
- Type: string
publibVersion
Required
public readonly publibVersion: string;
- Type: string
condition
Optional
public readonly condition: string;
- Type: string
Constants
Name | Type | Description |
---|---|---|
| string | No description. |
PUBLISH_GIT_TASK_NAME
Required
public readonly PUBLISH_GIT_TASK_NAME: string;
- Type: string
Release
Manages releases (currently through GitHub workflows).
By default, no branches are released. To add branches, call addBranch()
.
Initializers
import { release } from 'projen'
new release.Release(scope: IConstruct, options: ReleaseOptions)
Name | Type | Description |
---|---|---|
| constructs.IConstruct | should be part of the project the Release belongs to. |
|
| options to configure the Release Component. |
scope
Required
- Type: constructs.IConstruct
should be part of the project the Release belongs to.
options
Required
- Type: ReleaseOptions
options to configure the Release Component.
Methods
Name | Description |
---|---|
| Returns a string representation of this construct. |
| Called after synthesis. |
| Called before synthesis. |
| Synthesizes files to the project output directory. |
| Adds a release branch. |
| Adds jobs to all release workflows. |
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.
addBranch
public addBranch(branch: string, options: BranchOptions): void
Adds a release branch.
It is a git branch from which releases are published. If a project has more than one release
branch, we require that majorVersion
is also specified for the primary branch in order to
ensure branches always release the correct version.
branch
Required
- Type: string
The branch to monitor (e.g. main
, v2.x
).
options
Required
- Type: BranchOptions
Branch definition.
addJobs
public addJobs(jobs: {[ key: string ]: Job}): void
Adds jobs to all release workflows.
jobs
Required
- Type: {[ key: string ]: projen.github.workflows.Job}
The jobs to add (name => job).
Static Functions
Name | Description |
---|---|
| Checks if x is a construct. |
| Test whether the given construct is a component. |
| Returns the Release component of a project or undefined if the project does not have a Release component. |
isConstruct
import { release } from 'projen'
release.Release.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.
x
Required
- Type: any
Any object.
isComponent
import { release } from 'projen'
release.Release.isComponent(x: any)
Test whether the given construct is a component.
x
Required
- Type: any
of
import { release } from 'projen'
release.Release.of(project: Project)
Returns the Release
component of a project or undefined
if the project does not have a Release component.
project
Required
- Type: projen.Project
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
| projen.Project | No description. |
| string | Location of build artifacts. |
| string[] | Retrieve all release branch names. |
|
| Package publisher. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
project
Required
public readonly project: Project;
- Type: projen.Project
artifactsDirectory
Required
public readonly artifactsDirectory: string;
- Type: string
Location of build artifacts.
branches
Required
public readonly branches: string[];
- Type: string[]
Retrieve all release branch names.
publisher
Required
public readonly publisher: Publisher;
- Type: Publisher
Package publisher.
Constants
Name | Type | Description |
---|---|---|
| string | No description. |
ANTI_TAMPER_CMD
Required
public readonly ANTI_TAMPER_CMD: string;
- Type: string
Structs
BranchOptions
Options for a release branch.
Initializer
import { release } from 'projen'
const branchOptions: release.BranchOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| number | The major versions released from this branch. |
| number | The minimum major version to release. |
| number | The minor versions released from this branch. |
| string | The npm distribution tag to use for this branch. |
| string | Bump the version as a pre-release tag. |
| string | Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
| string | The name of the release workflow. |
majorVersion
Required
public readonly majorVersion: number;
- Type: number
The major versions released from this branch.
minMajorVersion
Optional
public readonly minMajorVersion: number;
- Type: number
The minimum major version to release.
minorVersion
Optional
public readonly minorVersion: number;
- Type: number
The minor versions released from this branch.
npmDistTag
Optional
public readonly npmDistTag: string;
- Type: string
- Default: "latest"
The npm distribution tag to use for this branch.
prerelease
Optional
public readonly prerelease: string;
- Type: string
- Default: normal releases
Bump the version as a pre-release tag.
tagPrefix
Optional
public readonly tagPrefix: string;
- Type: string
- Default: no prefix
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.
workflowName
Optional
public readonly workflowName: string;
- Type: string
- Default: "release-BRANCH"
The name of the release workflow.
CodeArtifactOptions
Options for publishing packages to AWS CodeArtifact.
Initializer
import { release } from 'projen'
const codeArtifactOptions: release.CodeArtifactOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| string | GitHub secret which contains the AWS access key ID to use when publishing packages to AWS CodeArtifact. |
|
| Provider to use for authorizing requests to AWS CodeArtifact. |
| string | ARN of AWS role to be assumed prior to get authorization token from AWS CodeArtifact This property must be specified only when publishing to AWS CodeArtifact (registry contains AWS CodeArtifact URL). |
| string | GitHub secret which contains the AWS secret access key to use when publishing packages to AWS CodeArtifact. |
accessKeyIdSecret
Optional
public readonly accessKeyIdSecret: string;
- Type: string
- Default: When the
authProvider
value is set toCodeArtifactAuthProvider.ACCESS_AND_SECRET_KEY_PAIR
, the default is "AWS_ACCESS_KEY_ID". ForCodeArtifactAuthProvider.GITHUB_OIDC
, this value must be left undefined.
GitHub secret which contains the AWS access key ID to use when publishing packages to AWS CodeArtifact.
This property must be specified only when publishing to AWS CodeArtifact (npmRegistryUrl
contains AWS CodeArtifact URL).
authProvider
Optional
public readonly authProvider: CodeArtifactAuthProvider;
- Type: CodeArtifactAuthProvider
- Default: CodeArtifactAuthProvider.ACCESS_AND_SECRET_KEY_PAIR
Provider to use for authorizing requests to AWS CodeArtifact.
roleToAssume
Optional
public readonly roleToAssume: string;
- Type: string
- Default: undefined
ARN of AWS role to be assumed prior to get authorization token from AWS CodeArtifact This property must be specified only when publishing to AWS CodeArtifact (registry
contains AWS CodeArtifact URL).
When using the CodeArtifactAuthProvider.GITHUB_OIDC
auth provider, this value must be defined.
secretAccessKeySecret
Optional
public readonly secretAccessKeySecret: string;
- Type: string
- Default: When the
authProvider
value is set toCodeArtifactAuthProvider.ACCESS_AND_SECRET_KEY_PAIR
, the default is "AWS_SECRET_ACCESS_KEY". ForCodeArtifactAuthProvider.GITHUB_OIDC
, this value must be left undefined.
GitHub secret which contains the AWS secret access key to use when publishing packages to AWS CodeArtifact.
This property must be specified only when publishing to AWS CodeArtifact (npmRegistryUrl
contains AWS CodeArtifact URL).
CommonPublishOptions
Common publishing options.
Initializer
import { release } from 'projen'
const commonPublishOptions: release.CommonPublishOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobStep[] | Steps to execute after executing the publishing command. |
| projen.github.workflows.JobStep[] | Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. |
| projen.github.workflows.Tools | Additional tools to install in the publishing job. |
postPublishSteps
Optional
public readonly postPublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
prePublishSteps
Optional
public readonly prePublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
publishTools
Optional
public readonly publishTools: Tools;
- Type: projen.github.workflows.Tools
- Default: no additional tools are installed
Additional tools to install in the publishing job.
ContinuousReleaseOptions
Initializer
import { release } from 'projen'
const continuousReleaseOptions: release.ContinuousReleaseOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| string[] | Paths for which pushes should trigger a release. |
paths
Optional
public readonly paths: string[];
- Type: string[]
Paths for which pushes should trigger a release.
GitHubReleasesPublishOptions
Publishing options for GitHub releases.
Initializer
import { release } from 'projen'
const gitHubReleasesPublishOptions: release.GitHubReleasesPublishOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobStep[] | Steps to execute after executing the publishing command. |
| projen.github.workflows.JobStep[] | Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. |
| projen.github.workflows.Tools | Additional tools to install in the publishing job. |
| string | The location of an .md file (relative to dist/ ) that includes the changelog for the release. |
| string | The location of a text file (relative to dist/ ) that contains the release tag. |
| string | The location of a text file (relative to dist/ ) that contains the version number. |
postPublishSteps
Optional
public readonly postPublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
prePublishSteps
Optional
public readonly prePublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
publishTools
Optional
public readonly publishTools: Tools;
- Type: projen.github.workflows.Tools
- Default: no additional tools are installed
Additional tools to install in the publishing job.
changelogFile
Required
public readonly changelogFile: string;
- Type: string
The location of an .md file (relative to dist/
) that includes the changelog for the release.
Example
changelog.md
releaseTagFile
Required
public readonly releaseTagFile: string;
- Type: string
The location of a text file (relative to dist/
) that contains the release tag.
Example
releasetag.txt
versionFile
Required
public readonly versionFile: string;
- Type: string
The location of a text file (relative to dist/
) that contains the version number.
Example
version.txt
GitPublishOptions
Publishing options for Git releases.
Initializer
import { release } from 'projen'
const gitPublishOptions: release.GitPublishOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| string | The location of an .md file (relative to dist/ ) that includes the changelog for the release. |
| string | The location of a text file (relative to dist/ ) that contains the release tag. |
| string | The location of a text file (relative to dist/ ) that contains the version number. |
| string | Branch to push to. |
| string | Override git-push command. |
| string | The location of an .md file that includes the project-level changelog. |
changelogFile
Required
public readonly changelogFile: string;
- Type: string
The location of an .md file (relative to dist/
) that includes the changelog for the release.
Example
changelog.md
releaseTagFile
Required
public readonly releaseTagFile: string;
- Type: string
The location of a text file (relative to dist/
) that contains the release tag.
Example
releasetag.txt
versionFile
Required
public readonly versionFile: string;
- Type: string
The location of a text file (relative to dist/
) that contains the version number.
Example
version.txt
gitBranch
Optional
public readonly gitBranch: string;
- Type: string
- Default: "main"
Branch to push to.
gitPushCommand
Optional
public readonly gitPushCommand: string;
- Type: string
Override git-push command.
Set to an empty string to disable pushing.
projectChangelogFile
Optional
public readonly projectChangelogFile: string;
- Type: string
The location of an .md file that includes the project-level changelog.
GoPublishOptions
Options for Go releases.
Initializer
import { release } from 'projen'
const goPublishOptions: release.GoPublishOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobStep[] | Steps to execute after executing the publishing command. |
| projen.github.workflows.JobStep[] | Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. |
| projen.github.workflows.Tools | Additional tools to install in the publishing job. |
| string | Branch to push to. |
| string | The commit message. |
| string | The name of the secret that includes a GitHub deploy key used to push to the GitHub repository. |
| string | The name of the secret that includes a personal GitHub access token used to push to the GitHub repository. |
| boolean | Use SSH to push to GitHub instead of a personal accses token. |
| string | The email to use in the release git commit. |
| string | The user name to use for the release git commit. |
postPublishSteps
Optional
public readonly postPublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
prePublishSteps
Optional
public readonly prePublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
publishTools
Optional
public readonly publishTools: Tools;
- Type: projen.github.workflows.Tools
- Default: no additional tools are installed
Additional tools to install in the publishing job.
gitBranch
Optional
public readonly gitBranch: string;
- Type: string
- Default: "main"
Branch to push to.
gitCommitMessage
Optional
public readonly gitCommitMessage: string;
- Type: string
- Default: "chore(release): $VERSION"
The commit message.
githubDeployKeySecret
Optional
public readonly githubDeployKeySecret: string;
- Type: string
- Default: "GO_GITHUB_DEPLOY_KEY"
The name of the secret that includes a GitHub deploy key used to push to the GitHub repository.
Ignored if githubUseSsh
is false
.
githubTokenSecret
Optional
public readonly githubTokenSecret: string;
- Type: string
- Default: "GO_GITHUB_TOKEN"
The name of the secret that includes a personal GitHub access token used to push to the GitHub repository.
Ignored if githubUseSsh
is true
.
githubUseSsh
Optional
public readonly githubUseSsh: boolean;
- Type: boolean
- Default: false
Use SSH to push to GitHub instead of a personal accses token.
gitUserEmail
Optional
public readonly gitUserEmail: string;
- Type: string
- Default: "github-actions@github.com"
The email to use in the release git commit.
gitUserName
Optional
public readonly gitUserName: string;
- Type: string
- Default: "github-actions"
The user name to use for the release git commit.
JsiiReleaseGo
Initializer
import { release } from 'projen'
const jsiiReleaseGo: release.JsiiReleaseGo = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobStep[] | Steps to execute after executing the publishing command. |
| projen.github.workflows.JobStep[] | Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. |
| projen.github.workflows.Tools | Additional tools to install in the publishing job. |
| string | Branch to push to. |
| string | The commit message. |
| string | The name of the secret that includes a GitHub deploy key used to push to the GitHub repository. |
| string | The name of the secret that includes a personal GitHub access token used to push to the GitHub repository. |
| boolean | Use SSH to push to GitHub instead of a personal accses token. |
| string | The email to use in the release git commit. |
| string | The user name to use for the release git commit. |
postPublishSteps
Optional
postPublishSteps
- Deprecated: Use
GoPublishOptions
instead.
public readonly postPublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
prePublishSteps
Optional
prePublishSteps
- Deprecated: Use
GoPublishOptions
instead.
public readonly prePublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
publishTools
Optional
publishTools
- Deprecated: Use
GoPublishOptions
instead.
public readonly publishTools: Tools;
- Type: projen.github.workflows.Tools
- Default: no additional tools are installed
Additional tools to install in the publishing job.
gitBranch
Optional
gitBranch
- Deprecated: Use
GoPublishOptions
instead.
public readonly gitBranch: string;
- Type: string
- Default: "main"
Branch to push to.
gitCommitMessage
Optional
gitCommitMessage
- Deprecated: Use
GoPublishOptions
instead.
public readonly gitCommitMessage: string;
- Type: string
- Default: "chore(release): $VERSION"
The commit message.
githubDeployKeySecret
Optional
githubDeployKeySecret
- Deprecated: Use
GoPublishOptions
instead.
public readonly githubDeployKeySecret: string;
- Type: string
- Default: "GO_GITHUB_DEPLOY_KEY"
The name of the secret that includes a GitHub deploy key used to push to the GitHub repository.
Ignored if githubUseSsh
is false
.
githubTokenSecret
Optional
githubTokenSecret
- Deprecated: Use
GoPublishOptions
instead.
public readonly githubTokenSecret: string;
- Type: string
- Default: "GO_GITHUB_TOKEN"
The name of the secret that includes a personal GitHub access token used to push to the GitHub repository.
Ignored if githubUseSsh
is true
.
githubUseSsh
Optional
githubUseSsh
- Deprecated: Use
GoPublishOptions
instead.
public readonly githubUseSsh: boolean;
- Type: boolean
- Default: false
Use SSH to push to GitHub instead of a personal accses token.
gitUserEmail
Optional
gitUserEmail
- Deprecated: Use
GoPublishOptions
instead.
public readonly gitUserEmail: string;
- Type: string
- Default: "github-actions@github.com"
The email to use in the release git commit.
gitUserName
Optional
gitUserName
- Deprecated: Use
GoPublishOptions
instead.
public readonly gitUserName: string;
- Type: string
- Default: "github-actions"
The user name to use for the release git commit.
JsiiReleaseMaven
Initializer
import { release } from 'projen'
const jsiiReleaseMaven: release.JsiiReleaseMaven = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobStep[] | Steps to execute after executing the publishing command. |
| projen.github.workflows.JobStep[] | Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. |
| projen.github.workflows.Tools | Additional tools to install in the publishing job. |
| string | URL of Nexus repository. |
| string | GitHub secret name which contains the GPG private key or file that includes it. |
| string | GitHub secret name which contains the GPG private key or file that includes it. |
| string | GitHub secret name which contains the Password for maven repository. |
| string | Deployment repository when not deploying to Maven Central. |
| string | Used in maven settings for credential lookup (e.g. use github when publishing to GitHub). |
| string | 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). |
| string | GitHub secret name which contains the Username for maven repository. |
postPublishSteps
Optional
postPublishSteps
- Deprecated: Use
MavenPublishOptions
instead.
public readonly postPublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
prePublishSteps
Optional
prePublishSteps
- Deprecated: Use
MavenPublishOptions
instead.
public readonly prePublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
publishTools
Optional
publishTools
- Deprecated: Use
MavenPublishOptions
instead.
public readonly publishTools: Tools;
- Type: projen.github.workflows.Tools
- Default: no additional tools are installed
Additional tools to install in the publishing job.
mavenEndpoint
Optional
mavenEndpoint
- Deprecated: Use
MavenPublishOptions
instead.
public readonly mavenEndpoint: string;
- Type: string
- Default: "https://oss.sonatype.org"
URL of Nexus repository.
if not set, defaults to https://oss.sonatype.org
mavenGpgPrivateKeyPassphrase
Optional
mavenGpgPrivateKeyPassphrase
- Deprecated: Use
MavenPublishOptions
instead.
public readonly mavenGpgPrivateKeyPassphrase: string;
- Type: string
- Default: "MAVEN_GPG_PRIVATE_KEY_PASSPHRASE" or not set when using GitHub Packages
GitHub secret name which contains the GPG private key or file that includes it.
This is used to sign your Maven packages. See instructions.
mavenGpgPrivateKeySecret
Optional
mavenGpgPrivateKeySecret
- Deprecated: Use
MavenPublishOptions
instead.
public readonly mavenGpgPrivateKeySecret: string;
- Type: string
- Default: "MAVEN_GPG_PRIVATE_KEY" or not set when using GitHub Packages
GitHub secret name which contains the GPG private key or file that includes it.
This is used to sign your Maven packages. See instructions.
mavenPassword
Optional
mavenPassword
- Deprecated: Use
MavenPublishOptions
instead.
public readonly mavenPassword: string;
- Type: string
- Default: "MAVEN_PASSWORD" or "GITHUB_TOKEN" when using GitHub Packages
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).
https://issues.sonatype.org/secure/CreateIssue.jspa?issuetype=21&pid=10134
mavenRepositoryUrl
Optional
mavenRepositoryUrl
- Deprecated: Use
MavenPublishOptions
instead.
public readonly mavenRepositoryUrl: string;
- Type: string
- Default: not set
Deployment repository when not deploying to Maven Central.
mavenServerId
Optional
mavenServerId
- Deprecated: Use
MavenPublishOptions
instead.
public readonly mavenServerId: string;
- Type: string
- Default: "ossrh" (Maven Central) or "github" when using GitHub Packages
Used in maven settings for credential lookup (e.g. use github when publishing to GitHub).
mavenStagingProfileId
Optional
mavenStagingProfileId
- Deprecated: Use
MavenPublishOptions
instead.
public readonly mavenStagingProfileId: string;
- Type: string
- Default: "MAVEN_STAGING_PROFILE_ID" or not set when using GitHub Packages
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).
mavenUsername
Optional
mavenUsername
- Deprecated: Use
MavenPublishOptions
instead.
public readonly mavenUsername: string;
- Type: string
- Default: "MAVEN_USERNAME" or the GitHub Actor when using GitHub Packages
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).
https://issues.sonatype.org/secure/CreateIssue.jspa?issuetype=21&pid=10134
JsiiReleaseNpm
Initializer
import { release } from 'projen'
const jsiiReleaseNpm: release.JsiiReleaseNpm = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobStep[] | Steps to execute after executing the publishing command. |
| projen.github.workflows.JobStep[] | Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. |
| projen.github.workflows.Tools | Additional tools to install in the publishing job. |
|
| Options for publishing npm package to AWS CodeArtifact. |
| string | Tags can be used to provide an alias instead of version numbers. |
| boolean | Should provenance statements be generated when package is published. |
| string | GitHub secret which contains the NPM token to use when publishing packages. |
| string | The domain name of the npm package registry. |
postPublishSteps
Optional
postPublishSteps
- Deprecated: Use
NpmPublishOptions
instead.
public readonly postPublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
prePublishSteps
Optional
prePublishSteps
- Deprecated: Use
NpmPublishOptions
instead.
public readonly prePublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
publishTools
Optional
publishTools
- Deprecated: Use
NpmPublishOptions
instead.
public readonly publishTools: Tools;
- Type: projen.github.workflows.Tools
- Default: no additional tools are installed
Additional tools to install in the publishing job.
codeArtifactOptions
Optional
codeArtifactOptions
- Deprecated: Use
NpmPublishOptions
instead.
public readonly codeArtifactOptions: CodeArtifactOptions;
- Type: CodeArtifactOptions
- Default: undefined
Options for publishing npm package to AWS CodeArtifact.
distTag
Optional
distTag
- Deprecated: Use
npmDistTag
for each release branch instead.
public readonly distTag: string;
- Type: string
- Default: "latest"
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.
npmProvenance
Optional
npmProvenance
- Deprecated: Use
NpmPublishOptions
instead.
public readonly npmProvenance: boolean;
- Type: boolean
- Default: undefined
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.
npmTokenSecret
Optional
npmTokenSecret
- Deprecated: Use
NpmPublishOptions
instead.
public readonly npmTokenSecret: string;
- Type: string
- Default: "NPM_TOKEN" or "GITHUB_TOKEN" if
registry
is set tonpm.pkg.github.com
.
GitHub secret which contains the NPM token to use when publishing packages.
registry
Optional
registry
- Deprecated: Use
NpmPublishOptions
instead.
public readonly registry: string;
- Type: string
- Default: "registry.npmjs.org"
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.
Example
"npm.pkg.github.com"
JsiiReleaseNuget
Initializer
import { release } from 'projen'
const jsiiReleaseNuget: release.JsiiReleaseNuget = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobStep[] | Steps to execute after executing the publishing command. |
| projen.github.workflows.JobStep[] | Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. |
| projen.github.workflows.Tools | Additional tools to install in the publishing job. |
| string | GitHub secret which contains the API key for NuGet. |
| string | NuGet Server URL (defaults to nuget.org). |
postPublishSteps
Optional
postPublishSteps
- Deprecated: Use
NugetPublishOptions
instead.
public readonly postPublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
prePublishSteps
Optional
prePublishSteps
- Deprecated: Use
NugetPublishOptions
instead.
public readonly prePublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
publishTools
Optional
publishTools
- Deprecated: Use
NugetPublishOptions
instead.
public readonly publishTools: Tools;
- Type: projen.github.workflows.Tools
- Default: no additional tools are installed
Additional tools to install in the publishing job.
nugetApiKeySecret
Optional
nugetApiKeySecret
- Deprecated: Use
NugetPublishOptions
instead.
public readonly nugetApiKeySecret: string;
- Type: string
- Default: "NUGET_API_KEY"
GitHub secret which contains the API key for NuGet.
nugetServer
Optional
nugetServer
- Deprecated: Use
NugetPublishOptions
instead.
public readonly nugetServer: string;
- Type: string
NuGet Server URL (defaults to nuget.org).
JsiiReleasePyPi
Initializer
import { release } from 'projen'
const jsiiReleasePyPi: release.JsiiReleasePyPi = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobStep[] | Steps to execute after executing the publishing command. |
| projen.github.workflows.JobStep[] | Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. |
| projen.github.workflows.Tools | Additional tools to install in the publishing job. |
|
| Options for publishing to AWS CodeArtifact. |
| string | The GitHub secret which contains PyPI password. |
| string | The registry url to use when releasing packages. |
| string | The GitHub secret which contains PyPI user name. |
postPublishSteps
Optional
postPublishSteps
- Deprecated: Use
PyPiPublishOptions
instead.
public readonly postPublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
prePublishSteps
Optional
prePublishSteps
- Deprecated: Use
PyPiPublishOptions
instead.
public readonly prePublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
publishTools
Optional
publishTools
- Deprecated: Use
PyPiPublishOptions
instead.
public readonly publishTools: Tools;
- Type: projen.github.workflows.Tools
- Default: no additional tools are installed
Additional tools to install in the publishing job.
codeArtifactOptions
Optional
codeArtifactOptions
- Deprecated: Use
PyPiPublishOptions
instead.
public readonly codeArtifactOptions: CodeArtifactOptions;
- Type: CodeArtifactOptions
- Default: undefined
Options for publishing to AWS CodeArtifact.
twinePasswordSecret
Optional
twinePasswordSecret
- Deprecated: Use
PyPiPublishOptions
instead.
public readonly twinePasswordSecret: string;
- Type: string
- Default: "TWINE_PASSWORD"
The GitHub secret which contains PyPI password.
twineRegistryUrl
Optional
twineRegistryUrl
- Deprecated: Use
PyPiPublishOptions
instead.
public readonly twineRegistryUrl: string;
- Type: string
- Default: twine default
The registry url to use when releasing packages.
twineUsernameSecret
Optional
twineUsernameSecret
- Deprecated: Use
PyPiPublishOptions
instead.
public readonly twineUsernameSecret: string;
- Type: string
- Default: "TWINE_USERNAME"
The GitHub secret which contains PyPI user name.
ManualReleaseOptions
Initializer
import { release } from 'projen'
const manualReleaseOptions: release.ManualReleaseOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| boolean | Maintain a project-level changelog. |
| string | Project-level changelog file path. |
| string | Override git-push command. |
changelog
Optional
public readonly changelog: boolean;
- Type: boolean
- Default: true
Maintain a project-level changelog.
changelogPath
Optional
public readonly changelogPath: string;
- Type: string
- Default: 'CHANGELOG.md'
Project-level changelog file path.
Ignored if changelog
is false.
gitPushCommand
Optional
public readonly gitPushCommand: string;
- Type: string
Override git-push command.
Set to an empty string to disable pushing.
MavenPublishOptions
Options for Maven releases.
Initializer
import { release } from 'projen'
const mavenPublishOptions: release.MavenPublishOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobStep[] | Steps to execute after executing the publishing command. |
| projen.github.workflows.JobStep[] | Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. |
| projen.github.workflows.Tools | Additional tools to install in the publishing job. |
| string | URL of Nexus repository. |
| string | GitHub secret name which contains the GPG private key or file that includes it. |
| string | GitHub secret name which contains the GPG private key or file that includes it. |
| string | GitHub secret name which contains the Password for maven repository. |
| string | Deployment repository when not deploying to Maven Central. |
| string | Used in maven settings for credential lookup (e.g. use github when publishing to GitHub). |
| string | 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). |
| string | GitHub secret name which contains the Username for maven repository. |
postPublishSteps
Optional
public readonly postPublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
prePublishSteps
Optional
public readonly prePublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
publishTools
Optional
public readonly publishTools: Tools;
- Type: projen.github.workflows.Tools
- Default: no additional tools are installed
Additional tools to install in the publishing job.
mavenEndpoint
Optional
public readonly mavenEndpoint: string;
- Type: string
- Default: "https://oss.sonatype.org"
URL of Nexus repository.
if not set, defaults to https://oss.sonatype.org
mavenGpgPrivateKeyPassphrase
Optional
public readonly mavenGpgPrivateKeyPassphrase: string;
- Type: string
- Default: "MAVEN_GPG_PRIVATE_KEY_PASSPHRASE" or not set when using GitHub Packages
GitHub secret name which contains the GPG private key or file that includes it.
This is used to sign your Maven packages. See instructions.
mavenGpgPrivateKeySecret
Optional
public readonly mavenGpgPrivateKeySecret: string;
- Type: string
- Default: "MAVEN_GPG_PRIVATE_KEY" or not set when using GitHub Packages
GitHub secret name which contains the GPG private key or file that includes it.
This is used to sign your Maven packages. See instructions.
mavenPassword
Optional
public readonly mavenPassword: string;
- Type: string
- Default: "MAVEN_PASSWORD" or "GITHUB_TOKEN" when using GitHub Packages
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).
https://issues.sonatype.org/secure/CreateIssue.jspa?issuetype=21&pid=10134
mavenRepositoryUrl
Optional
public readonly mavenRepositoryUrl: string;
- Type: string
- Default: not set
Deployment repository when not deploying to Maven Central.
mavenServerId
Optional
public readonly mavenServerId: string;
- Type: string
- Default: "ossrh" (Maven Central) or "github" when using GitHub Packages
Used in maven settings for credential lookup (e.g. use github when publishing to GitHub).
mavenStagingProfileId
Optional
public readonly mavenStagingProfileId: string;
- Type: string
- Default: "MAVEN_STAGING_PROFILE_ID" or not set when using GitHub Packages
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).
mavenUsername
Optional
public readonly mavenUsername: string;
- Type: string
- Default: "MAVEN_USERNAME" or the GitHub Actor when using GitHub Packages
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).
https://issues.sonatype.org/secure/CreateIssue.jspa?issuetype=21&pid=10134
NpmPublishOptions
Options for npm release.
Initializer
import { release } from 'projen'
const npmPublishOptions: release.NpmPublishOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobStep[] | Steps to execute after executing the publishing command. |
| projen.github.workflows.JobStep[] | Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. |
| projen.github.workflows.Tools | Additional tools to install in the publishing job. |
|
| Options for publishing npm package to AWS CodeArtifact. |
| string | Tags can be used to provide an alias instead of version numbers. |
| boolean | Should provenance statements be generated when package is published. |
| string | GitHub secret which contains the NPM token to use when publishing packages. |
| string | The domain name of the npm package registry. |
postPublishSteps
Optional
public readonly postPublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
prePublishSteps
Optional
public readonly prePublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
publishTools
Optional
public readonly publishTools: Tools;
- Type: projen.github.workflows.Tools
- Default: no additional tools are installed
Additional tools to install in the publishing job.
codeArtifactOptions
Optional
public readonly codeArtifactOptions: CodeArtifactOptions;
- Type: CodeArtifactOptions
- Default: undefined
Options for publishing npm package to AWS CodeArtifact.
distTag
Optional
distTag
- Deprecated: Use
npmDistTag
for each release branch instead.
public readonly distTag: string;
- Type: string
- Default: "latest"
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.
npmProvenance
Optional
public readonly npmProvenance: boolean;
- Type: boolean
- Default: undefined
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.
npmTokenSecret
Optional
public readonly npmTokenSecret: string;
- Type: string
- Default: "NPM_TOKEN" or "GITHUB_TOKEN" if
registry
is set tonpm.pkg.github.com
.
GitHub secret which contains the NPM token to use when publishing packages.
registry
Optional
public readonly registry: string;
- Type: string
- Default: "registry.npmjs.org"
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.
Example
"npm.pkg.github.com"
NugetPublishOptions
Options for NuGet releases.
Initializer
import { release } from 'projen'
const nugetPublishOptions: release.NugetPublishOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobStep[] | Steps to execute after executing the publishing command. |
| projen.github.workflows.JobStep[] | Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. |
| projen.github.workflows.Tools | Additional tools to install in the publishing job. |
| string | GitHub secret which contains the API key for NuGet. |
| string | NuGet Server URL (defaults to nuget.org). |
postPublishSteps
Optional
public readonly postPublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
prePublishSteps
Optional
public readonly prePublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
publishTools
Optional
public readonly publishTools: Tools;
- Type: projen.github.workflows.Tools
- Default: no additional tools are installed
Additional tools to install in the publishing job.
nugetApiKeySecret
Optional
public readonly nugetApiKeySecret: string;
- Type: string
- Default: "NUGET_API_KEY"
GitHub secret which contains the API key for NuGet.
nugetServer
Optional
public readonly nugetServer: string;
- Type: string
NuGet Server URL (defaults to nuget.org).
PublisherOptions
Options for Publisher
.
Initializer
import { release } from 'projen'
const publisherOptions: release.PublisherOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| string | The name of the artifact to download (e.g. dist ). |
| string | The job ID that produces the build artifacts. |
| string | A GitHub workflow expression used as a condition for publishers. |
| boolean | Do not actually publish, only print the commands that would be executed instead. |
| boolean | Create an issue when a publish task fails. |
| string | The label to apply to the issue marking failed publish tasks. |
| string | No description. |
| string | Version requirement for publib . |
| boolean | Define publishing tasks that can be executed manually as well as workflows. |
| string | Container image to use for GitHub workflows. |
| string | Node version to setup in GitHub workflows if any node-based CLI utilities are needed. |
| string[] | Github Runner selection labels. |
| projen.GroupRunnerOptions | Github Runner Group selection options. |
artifactName
Required
public readonly artifactName: string;
- Type: string
The name of the artifact to download (e.g. dist
).
The artifact is expected to include a subdirectory for each release target:
go
(GitHub), dotnet
(NuGet), java
(Maven), js
(npm), python
(PyPI).
buildJobId
Required
public readonly buildJobId: string;
- Type: string
The job ID that produces the build artifacts.
All publish jobs will take a dependency on this job.
condition
Optional
public readonly condition: string;
- Type: string
- Default: no condition
A GitHub workflow expression used as a condition for publishers.
dryRun
Optional
public readonly dryRun: boolean;
- Type: boolean
Do not actually publish, only print the commands that would be executed instead.
Useful if you wish to block all publishing from a single option.
failureIssue
Optional
public readonly failureIssue: boolean;
- Type: boolean
- Default: false
Create an issue when a publish task fails.
failureIssueLabel
Optional
public readonly failureIssueLabel: string;
- Type: string
- Default: "failed-release"
The label to apply to the issue marking failed publish tasks.
Only applies if failureIssue
is true.
jsiiReleaseVersion
Optional
jsiiReleaseVersion
- Deprecated: use
publibVersion
instead
public readonly jsiiReleaseVersion: string;
- Type: string
publibVersion
Optional
public readonly publibVersion: string;
- Type: string
- Default: "latest"
Version requirement for publib
.
publishTasks
Optional
public readonly publishTasks: boolean;
- Type: boolean
- Default: false
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.
workflowContainerImage
Optional
public readonly workflowContainerImage: string;
- Type: string
- Default: default image
Container image to use for GitHub workflows.
workflowNodeVersion
Optional
public readonly workflowNodeVersion: string;
- Type: string
- Default: lts/*
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.
workflowRunsOn
Optional
public readonly workflowRunsOn: string[];
- Type: string[]
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public readonly workflowRunsOnGroup: GroupRunnerOptions;
- Type: projen.GroupRunnerOptions
Github Runner Group selection options.
PyPiPublishOptions
Options for PyPI release.
Initializer
import { release } from 'projen'
const pyPiPublishOptions: release.PyPiPublishOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| projen.github.workflows.JobStep[] | Steps to execute after executing the publishing command. |
| projen.github.workflows.JobStep[] | Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. |
| projen.github.workflows.Tools | Additional tools to install in the publishing job. |
|
| Options for publishing to AWS CodeArtifact. |
| string | The GitHub secret which contains PyPI password. |
| string | The registry url to use when releasing packages. |
| string | The GitHub secret which contains PyPI user name. |
postPublishSteps
Optional
public readonly postPublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
prePublishSteps
Optional
public readonly prePublishSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
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
.
publishTools
Optional
public readonly publishTools: Tools;
- Type: projen.github.workflows.Tools
- Default: no additional tools are installed
Additional tools to install in the publishing job.
codeArtifactOptions
Optional
public readonly codeArtifactOptions: CodeArtifactOptions;
- Type: CodeArtifactOptions
- Default: undefined
Options for publishing to AWS CodeArtifact.
twinePasswordSecret
Optional
public readonly twinePasswordSecret: string;
- Type: string
- Default: "TWINE_PASSWORD"
The GitHub secret which contains PyPI password.
twineRegistryUrl
Optional
public readonly twineRegistryUrl: string;
- Type: string
- Default: twine default
The registry url to use when releasing packages.
twineUsernameSecret
Optional
public readonly twineUsernameSecret: string;
- Type: string
- Default: "TWINE_USERNAME"
The GitHub secret which contains PyPI user name.
ReleaseOptions
Options for Release
.
Initializer
import { release } from 'projen'
const releaseOptions: release.ReleaseOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| string | The commit-and-tag-version compatible package used to bump the package version, as a dependency string. |
| string | Version requirement of publib which is used to publish modules to npm. |
| number | Major version to release from the default branch. |
| number | Minimal Major version to release. |
| string | A shell command to control the next version to release. |
| string | The npmDistTag to use when publishing from the default branch. |
| projen.github.workflows.JobStep[] | Steps to execute after build as part of the release workflow. |
| string | Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
| boolean | Instead of actually publishing to package managers, just print the publishing command. |
| boolean | Define publishing tasks that can be executed manually as well as workflows. |
| projen.ReleasableCommits | Find commits that should be considered releasable Used to decide if a release is required. |
|
| Defines additional release branches. |
| boolean | Automatically release new versions every commit to one of branches in releaseBranches . |
| boolean | Create a github issue on every failed publishing task. |
| string | The label to apply to issues indicating publish failures. |
| string | CRON schedule to trigger new releases. |
| string | Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
|
| The release trigger to use. |
| string | The name of the default release workflow. |
| projen.github.workflows.JobStep[] | A set of workflow steps to execute in order to setup the workflow container. |
| {[ key: string ]: any} | Custom configuration used when creating changelog with commit-and-tag-version package. |
| string | Container image to use for GitHub workflows. |
| string[] | Github Runner selection labels. |
| projen.GroupRunnerOptions | Github Runner Group selection options. |
| string | A directory which will contain build artifacts. |
| string | The default branch name to release from. |
| projen.Task | The task to execute in order to create the release artifacts. |
| string | A name of a .json file to set the version field in after a bump. |
| boolean | Create a GitHub release for each release. |
| string | Node version to setup in GitHub workflows if any node-based CLI utilities are needed. |
| projen.github.workflows.JobPermissions | Permissions granted to the release workflow job. |
bumpPackage
Optional
public readonly bumpPackage: string;
- Type: string
- Default: A recent version of "commit-and-tag-version"
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
.
jsiiReleaseVersion
Optional
public readonly jsiiReleaseVersion: string;
- Type: string
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
majorVersion
Optional
public readonly majorVersion: number;
- Type: number
- Default: Major version is not enforced.
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.
minMajorVersion
Optional
public readonly minMajorVersion: number;
- Type: number
- Default: No minimum version is being enforced
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
.
nextVersionCommand
Optional
public readonly nextVersionCommand: string;
- Type: string
- Default: The next version will be determined based on the commit history and project settings.
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 like1.2.3
.$LATEST_TAG
: the most recent tag. Looks likeprefix-v1.2.3
, or may be unset.
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 bex.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
.
npmDistTag
Optional
public readonly npmDistTag: string;
- Type: string
- Default: "latest"
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.
postBuildSteps
Optional
public readonly postBuildSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
public readonly prerelease: string;
- Type: string
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
publishDryRun
Optional
public readonly publishDryRun: boolean;
- Type: boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
public readonly publishTasks: boolean;
- Type: boolean
- Default: false
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.
releasableCommits
Optional
public readonly releasableCommits: ReleasableCommits;
- Type: projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseBranches
Optional
public readonly releaseBranches: {[ key: string ]: BranchOptions};
- Type: {[ key: string ]: BranchOptions}
- Default: no additional branches are used for release. you can use
addBranch()
to add additional branches.
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.
releaseEveryCommit
Optional
releaseEveryCommit
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()
instead
public readonly releaseEveryCommit: boolean;
- Type: boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches
.
releaseFailureIssue
Optional
public readonly releaseFailureIssue: boolean;
- Type: boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
public readonly releaseFailureIssueLabel: string;
- Type: string
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue
is true.
releaseSchedule
Optional
releaseSchedule
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()
instead
public readonly releaseSchedule: string;
- Type: string
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefix
Optional
public readonly releaseTagPrefix: string;
- Type: string
- Default: "v"
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.
releaseTrigger
Optional
public readonly releaseTrigger: ReleaseTrigger;
- Type: ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous()
)
The release trigger to use.
releaseWorkflowName
Optional
public readonly releaseWorkflowName: string;
- Type: string
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
public readonly releaseWorkflowSetupSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
A set of workflow steps to execute in order to setup the workflow container.
versionrcOptions
Optional
public readonly versionrcOptions: {[ key: string ]: any};
- Type: {[ key: string ]: any}
- Default: standard configuration applicable for GitHub repositories
Custom configuration used when creating changelog with commit-and-tag-version package.
Given values either append to default configuration or overwrite values in it.
workflowContainerImage
Optional
public readonly workflowContainerImage: string;
- Type: string
- Default: default image
Container image to use for GitHub workflows.
workflowRunsOn
Optional
public readonly workflowRunsOn: string[];
- Type: string[]
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public readonly workflowRunsOnGroup: GroupRunnerOptions;
- Type: projen.GroupRunnerOptions
Github Runner Group selection options.
artifactsDirectory
Required
public readonly artifactsDirectory: string;
- Type: string
- Default: "dist"
A directory which will contain build artifacts.
branch
Required
public readonly branch: string;
- Type: string
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()
.
task
Required
public readonly task: Task;
- Type: projen.Task
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.
versionFile
Required
public readonly versionFile: string;
- Type: string
A name of a .json file to set the version
field in after a bump.
Example
"package.json"
githubRelease
Optional
public readonly githubRelease: boolean;
- Type: boolean
- Default: true
Create a GitHub release for each release.
workflowNodeVersion
Optional
public readonly workflowNodeVersion: string;
- Type: string
- Default: "lts/*""
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.
workflowPermissions
Optional
public readonly workflowPermissions: JobPermissions;
- Type: projen.github.workflows.JobPermissions
- Default:
{ contents: JobPermission.WRITE }
Permissions granted to the release workflow job.
ReleaseProjectOptions
Project options for release.
Initializer
import { release } from 'projen'
const releaseProjectOptions: release.ReleaseProjectOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
| string | The commit-and-tag-version compatible package used to bump the package version, as a dependency string. |
| string | Version requirement of publib which is used to publish modules to npm. |
| number | Major version to release from the default branch. |
| number | Minimal Major version to release. |
| string | A shell command to control the next version to release. |
| string | The npmDistTag to use when publishing from the default branch. |
| projen.github.workflows.JobStep[] | Steps to execute after build as part of the release workflow. |
| string | Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
| boolean | Instead of actually publishing to package managers, just print the publishing command. |
| boolean | Define publishing tasks that can be executed manually as well as workflows. |
| projen.ReleasableCommits | Find commits that should be considered releasable Used to decide if a release is required. |
|
| Defines additional release branches. |
| boolean | Automatically release new versions every commit to one of branches in releaseBranches . |
| boolean | Create a github issue on every failed publishing task. |
| string | The label to apply to issues indicating publish failures. |
| string | CRON schedule to trigger new releases. |
| string | Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
|
| The release trigger to use. |
| string | The name of the default release workflow. |
| projen.github.workflows.JobStep[] | A set of workflow steps to execute in order to setup the workflow container. |
| {[ key: string ]: any} | Custom configuration used when creating changelog with commit-and-tag-version package. |
| string | Container image to use for GitHub workflows. |
| string[] | Github Runner selection labels. |
| projen.GroupRunnerOptions | Github Runner Group selection options. |
bumpPackage
Optional
public readonly bumpPackage: string;
- Type: string
- Default: A recent version of "commit-and-tag-version"
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
.
jsiiReleaseVersion
Optional
public readonly jsiiReleaseVersion: string;
- Type: string
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.