Documentation
¶
Index ¶
- func NewPublisher_Override(p Publisher, project projen.Project, options *PublisherOptions)
- func NewRelease_Override(r Release, scope constructs.IConstruct, options *ReleaseOptions)
- func Publisher_IsComponent(x interface{}) *bool
- func Publisher_IsConstruct(x interface{}) *bool
- func Publisher_PUBLISH_GIT_TASK_NAME() *string
- func Release_ANTI_TAMPER_CMD() *string
- func Release_IsComponent(x interface{}) *bool
- func Release_IsConstruct(x interface{}) *bool
- type BranchOptions
- type CodeArtifactAuthProvider
- type CodeArtifactOptions
- type CommonPublishOptions
- type ContinuousReleaseOptions
- type GitHubReleasesPublishOptions
- type GitPublishOptions
- type GoPublishOptions
- type JsiiReleaseGodeprecated
- type JsiiReleaseMavendeprecated
- type JsiiReleaseNpmdeprecated
- type JsiiReleaseNugetdeprecated
- type JsiiReleasePyPideprecated
- type ManualReleaseOptions
- type MavenPublishOptions
- type NpmPublishOptions
- type NugetPublishOptions
- type Publisher
- type PublisherOptions
- type PyPiPublishOptions
- type Release
- type ReleaseOptions
- type ReleaseProjectOptions
- type ReleaseTrigger
- type ScheduledReleaseOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPublisher_Override ¶
func NewPublisher_Override(p Publisher, project projen.Project, options *PublisherOptions)
Experimental.
func NewRelease_Override ¶
func NewRelease_Override(r Release, scope constructs.IConstruct, options *ReleaseOptions)
Experimental.
func Publisher_IsComponent ¶ added in v0.76.9
func Publisher_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func Publisher_IsConstruct ¶ added in v0.76.9
func Publisher_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Publisher_PUBLISH_GIT_TASK_NAME ¶
func Publisher_PUBLISH_GIT_TASK_NAME() *string
func Release_ANTI_TAMPER_CMD ¶
func Release_ANTI_TAMPER_CMD() *string
func Release_IsComponent ¶ added in v0.76.9
func Release_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func Release_IsConstruct ¶ added in v0.76.9
func Release_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
Types ¶
type BranchOptions ¶
type BranchOptions struct {
// The major versions released from this branch.
// Experimental.
MajorVersion *float64 `field:"required" json:"majorVersion" yaml:"majorVersion"`
// The minimum major version to release.
// Experimental.
MinMajorVersion *float64 `field:"optional" json:"minMajorVersion" yaml:"minMajorVersion"`
// The minor versions released from this branch.
// Experimental.
MinorVersion *float64 `field:"optional" json:"minorVersion" yaml:"minorVersion"`
// The npm distribution tag to use for this branch.
// Default: "latest".
//
// Experimental.
NpmDistTag *string `field:"optional" json:"npmDistTag" yaml:"npmDistTag"`
// Bump the version as a pre-release tag.
// Default: - normal releases.
//
// Experimental.
Prerelease *string `field:"optional" json:"prerelease" yaml:"prerelease"`
// 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: - no prefix.
//
// Experimental.
TagPrefix *string `field:"optional" json:"tagPrefix" yaml:"tagPrefix"`
// The name of the release workflow.
// Default: "release-BRANCH".
//
// Experimental.
WorkflowName *string `field:"optional" json:"workflowName" yaml:"workflowName"`
}
Options for a release branch. Experimental.
type CodeArtifactAuthProvider ¶
type CodeArtifactAuthProvider string
Options for authorizing requests to a AWS CodeArtifact npm repository. Experimental.
const ( // Fixed credentials provided via Github secrets. // Experimental. CodeArtifactAuthProvider_ACCESS_AND_SECRET_KEY_PAIR CodeArtifactAuthProvider = "ACCESS_AND_SECRET_KEY_PAIR" // Ephemeral credentials provided via Github's OIDC integration with an IAM role. // // See: // https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html // https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services // Experimental. CodeArtifactAuthProvider_GITHUB_OIDC CodeArtifactAuthProvider = "GITHUB_OIDC" )
type CodeArtifactOptions ¶
type CodeArtifactOptions struct {
// 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).
// Default: - When the `authProvider` value is set to
// `CodeArtifactAuthProvider.ACCESS_AND_SECRET_KEY_PAIR`, the default is
// "AWS_ACCESS_KEY_ID". For `CodeArtifactAuthProvider.GITHUB_OIDC`, this
// value must be left undefined.
//
// Experimental.
AccessKeyIdSecret *string `field:"optional" json:"accessKeyIdSecret" yaml:"accessKeyIdSecret"`
// Provider to use for authorizing requests to AWS CodeArtifact.
// Default: CodeArtifactAuthProvider.ACCESS_AND_SECRET_KEY_PAIR
//
// Experimental.
AuthProvider CodeArtifactAuthProvider `field:"optional" json:"authProvider" yaml:"authProvider"`
// 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.
// Default: undefined.
//
// Experimental.
RoleToAssume *string `field:"optional" json:"roleToAssume" yaml:"roleToAssume"`
// 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).
// Default: - When the `authProvider` value is set to
// `CodeArtifactAuthProvider.ACCESS_AND_SECRET_KEY_PAIR`, the default is
// "AWS_SECRET_ACCESS_KEY". For `CodeArtifactAuthProvider.GITHUB_OIDC`, this
// value must be left undefined.
//
// Experimental.
SecretAccessKeySecret *string `field:"optional" json:"secretAccessKeySecret" yaml:"secretAccessKeySecret"`
}
Options for publishing packages to AWS CodeArtifact. Experimental.
type CommonPublishOptions ¶
type CommonPublishOptions struct {
// 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`.
// Experimental.
PostPublishSteps *[]*workflows.JobStep `field:"optional" json:"postPublishSteps" yaml:"postPublishSteps"`
// 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`.
// Experimental.
PrePublishSteps *[]*workflows.JobStep `field:"optional" json:"prePublishSteps" yaml:"prePublishSteps"`
// Additional tools to install in the publishing job.
// Default: - no additional tools are installed.
//
// Experimental.
PublishTools *workflows.Tools `field:"optional" json:"publishTools" yaml:"publishTools"`
}
Common publishing options. Experimental.
type ContinuousReleaseOptions ¶ added in v0.80.17
type ContinuousReleaseOptions struct {
// Paths for which pushes should trigger a release.
// Experimental.
Paths *[]*string `field:"optional" json:"paths" yaml:"paths"`
}
Experimental.
type GitHubReleasesPublishOptions ¶
type GitHubReleasesPublishOptions struct {
// 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`.
// Experimental.
PostPublishSteps *[]*workflows.JobStep `field:"optional" json:"postPublishSteps" yaml:"postPublishSteps"`
// 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`.
// Experimental.
PrePublishSteps *[]*workflows.JobStep `field:"optional" json:"prePublishSteps" yaml:"prePublishSteps"`
// Additional tools to install in the publishing job.
// Default: - no additional tools are installed.
//
// Experimental.
PublishTools *workflows.Tools `field:"optional" json:"publishTools" yaml:"publishTools"`
// The location of an .md file (relative to `dist/`) that includes the changelog for the release.
//
// Example:
// changelog.md
//
// Experimental.
ChangelogFile *string `field:"required" json:"changelogFile" yaml:"changelogFile"`
// The location of a text file (relative to `dist/`) that contains the release tag.
//
// Example:
// releasetag.txt
//
// Experimental.
ReleaseTagFile *string `field:"required" json:"releaseTagFile" yaml:"releaseTagFile"`
// The location of a text file (relative to `dist/`) that contains the version number.
//
// Example:
// version.txt
//
// Experimental.
VersionFile *string `field:"required" json:"versionFile" yaml:"versionFile"`
}
Publishing options for GitHub releases. Experimental.
type GitPublishOptions ¶
type GitPublishOptions struct {
// The location of an .md file (relative to `dist/`) that includes the changelog for the release.
//
// Example:
// changelog.md
//
// Experimental.
ChangelogFile *string `field:"required" json:"changelogFile" yaml:"changelogFile"`
// The location of a text file (relative to `dist/`) that contains the release tag.
//
// Example:
// releasetag.txt
//
// Experimental.
ReleaseTagFile *string `field:"required" json:"releaseTagFile" yaml:"releaseTagFile"`
// The location of a text file (relative to `dist/`) that contains the version number.
//
// Example:
// version.txt
//
// Experimental.
VersionFile *string `field:"required" json:"versionFile" yaml:"versionFile"`
// Branch to push to.
// Default: "main".
//
// Experimental.
GitBranch *string `field:"optional" json:"gitBranch" yaml:"gitBranch"`
// Override git-push command.
//
// Set to an empty string to disable pushing.
// Experimental.
GitPushCommand *string `field:"optional" json:"gitPushCommand" yaml:"gitPushCommand"`
// The location of an .md file that includes the project-level changelog.
// Experimental.
ProjectChangelogFile *string `field:"optional" json:"projectChangelogFile" yaml:"projectChangelogFile"`
}
Publishing options for Git releases. Experimental.
type GoPublishOptions ¶
type GoPublishOptions struct {
// 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`.
// Experimental.
PostPublishSteps *[]*workflows.JobStep `field:"optional" json:"postPublishSteps" yaml:"postPublishSteps"`
// 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`.
// Experimental.
PrePublishSteps *[]*workflows.JobStep `field:"optional" json:"prePublishSteps" yaml:"prePublishSteps"`
// Additional tools to install in the publishing job.
// Default: - no additional tools are installed.
//
// Experimental.
PublishTools *workflows.Tools `field:"optional" json:"publishTools" yaml:"publishTools"`
// Branch to push to.
// Default: "main".
//
// Experimental.
GitBranch *string `field:"optional" json:"gitBranch" yaml:"gitBranch"`
// The commit message.
// Default: "chore(release): $VERSION".
//
// Experimental.
GitCommitMessage *string `field:"optional" json:"gitCommitMessage" yaml:"gitCommitMessage"`
// 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".
//
// Experimental.
GithubDeployKeySecret *string `field:"optional" json:"githubDeployKeySecret" yaml:"githubDeployKeySecret"`
// 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".
//
// Experimental.
GithubTokenSecret *string `field:"optional" json:"githubTokenSecret" yaml:"githubTokenSecret"`
// Use SSH to push to GitHub instead of a personal accses token.
// Default: false.
//
// Experimental.
GithubUseSsh *bool `field:"optional" json:"githubUseSsh" yaml:"githubUseSsh"`
// The email to use in the release git commit.
// Default: "github-actions@github.com"
//
// Experimental.
GitUserEmail *string `field:"optional" json:"gitUserEmail" yaml:"gitUserEmail"`
// The user name to use for the release git commit.
// Default: "github-actions".
//
// Experimental.
GitUserName *string `field:"optional" json:"gitUserName" yaml:"gitUserName"`
}
Options for Go releases. Experimental.
type JsiiReleaseGo
deprecated
type JsiiReleaseGo struct {
// 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`.
// Deprecated: Use `GoPublishOptions` instead.
PostPublishSteps *[]*workflows.JobStep `field:"optional" json:"postPublishSteps" yaml:"postPublishSteps"`
// 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`.
// Deprecated: Use `GoPublishOptions` instead.
PrePublishSteps *[]*workflows.JobStep `field:"optional" json:"prePublishSteps" yaml:"prePublishSteps"`
// Additional tools to install in the publishing job.
// Default: - no additional tools are installed.
//
// Deprecated: Use `GoPublishOptions` instead.
PublishTools *workflows.Tools `field:"optional" json:"publishTools" yaml:"publishTools"`
// Branch to push to.
// Default: "main".
//
// Deprecated: Use `GoPublishOptions` instead.
GitBranch *string `field:"optional" json:"gitBranch" yaml:"gitBranch"`
// The commit message.
// Default: "chore(release): $VERSION".
//
// Deprecated: Use `GoPublishOptions` instead.
GitCommitMessage *string `field:"optional" json:"gitCommitMessage" yaml:"gitCommitMessage"`
// 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".
//
// Deprecated: Use `GoPublishOptions` instead.
GithubDeployKeySecret *string `field:"optional" json:"githubDeployKeySecret" yaml:"githubDeployKeySecret"`
// 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".
//
// Deprecated: Use `GoPublishOptions` instead.
GithubTokenSecret *string `field:"optional" json:"githubTokenSecret" yaml:"githubTokenSecret"`
// Use SSH to push to GitHub instead of a personal accses token.
// Default: false.
//
// Deprecated: Use `GoPublishOptions` instead.
GithubUseSsh *bool `field:"optional" json:"githubUseSsh" yaml:"githubUseSsh"`
// The email to use in the release git commit.
// Default: "github-actions@github.com"
//
// Deprecated: Use `GoPublishOptions` instead.
GitUserEmail *string `field:"optional" json:"gitUserEmail" yaml:"gitUserEmail"`
// The user name to use for the release git commit.
// Default: "github-actions".
//
// Deprecated: Use `GoPublishOptions` instead.
GitUserName *string `field:"optional" json:"gitUserName" yaml:"gitUserName"`
}
Deprecated: Use `GoPublishOptions` instead.
type JsiiReleaseMaven
deprecated
type JsiiReleaseMaven struct {
// 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`.
// Deprecated: Use `MavenPublishOptions` instead.
PostPublishSteps *[]*workflows.JobStep `field:"optional" json:"postPublishSteps" yaml:"postPublishSteps"`
// 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`.
// Deprecated: Use `MavenPublishOptions` instead.
PrePublishSteps *[]*workflows.JobStep `field:"optional" json:"prePublishSteps" yaml:"prePublishSteps"`
// Additional tools to install in the publishing job.
// Default: - no additional tools are installed.
//
// Deprecated: Use `MavenPublishOptions` instead.
PublishTools *workflows.Tools `field:"optional" json:"publishTools" yaml:"publishTools"`
// URL of Nexus repository.
//
// if not set, defaults to https://oss.sonatype.org
// Default: "https://oss.sonatype.org"
//
// Deprecated: Use `MavenPublishOptions` instead.
MavenEndpoint *string `field:"optional" json:"mavenEndpoint" yaml:"mavenEndpoint"`
// GitHub secret name which contains the GPG private key or file that includes it.
//
// This is used to sign your Maven packages. See instructions.
// See: https://github.com/aws/publib#maven
//
// Default: "MAVEN_GPG_PRIVATE_KEY_PASSPHRASE" or not set when using GitHub Packages.
//
// Deprecated: Use `MavenPublishOptions` instead.
MavenGpgPrivateKeyPassphrase *string `field:"optional" json:"mavenGpgPrivateKeyPassphrase" yaml:"mavenGpgPrivateKeyPassphrase"`
// GitHub secret name which contains the GPG private key or file that includes it.
//
// This is used to sign your Maven
// packages. See instructions.
// See: https://github.com/aws/publib#maven
//
// Default: "MAVEN_GPG_PRIVATE_KEY" or not set when using GitHub Packages.
//
// Deprecated: Use `MavenPublishOptions` instead.
MavenGpgPrivateKeySecret *string `field:"optional" json:"mavenGpgPrivateKeySecret" yaml:"mavenGpgPrivateKeySecret"`
// 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).
// See: https://issues.sonatype.org/secure/CreateIssue.jspa?issuetype=21&pid=10134
//
// Default: "MAVEN_PASSWORD" or "GITHUB_TOKEN" when using GitHub Packages.
//
// Deprecated: Use `MavenPublishOptions` instead.
MavenPassword *string `field:"optional" json:"mavenPassword" yaml:"mavenPassword"`
// Deployment repository when not deploying to Maven Central.
// Default: - not set.
//
// Deprecated: Use `MavenPublishOptions` instead.
MavenRepositoryUrl *string `field:"optional" json:"mavenRepositoryUrl" yaml:"mavenRepositoryUrl"`
// 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.
//
// Deprecated: Use `MavenPublishOptions` instead.
MavenServerId *string `field:"optional" json:"mavenServerId" yaml:"mavenServerId"`
// 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.
//
// Deprecated: Use `MavenPublishOptions` instead.
MavenStagingProfileId *string `field:"optional" json:"mavenStagingProfileId" yaml:"mavenStagingProfileId"`
// 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).
// See: https://issues.sonatype.org/secure/CreateIssue.jspa?issuetype=21&pid=10134
//
// Default: "MAVEN_USERNAME" or the GitHub Actor when using GitHub Packages.
//
// Deprecated: Use `MavenPublishOptions` instead.
MavenUsername *string `field:"optional" json:"mavenUsername" yaml:"mavenUsername"`
}
Deprecated: Use `MavenPublishOptions` instead.
type JsiiReleaseNpm
deprecated
type JsiiReleaseNpm struct {
// 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`.
// Deprecated: Use `NpmPublishOptions` instead.
PostPublishSteps *[]*workflows.JobStep `field:"optional" json:"postPublishSteps" yaml:"postPublishSteps"`
// 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`.
// Deprecated: Use `NpmPublishOptions` instead.
PrePublishSteps *[]*workflows.JobStep `field:"optional" json:"prePublishSteps" yaml:"prePublishSteps"`
// Additional tools to install in the publishing job.
// Default: - no additional tools are installed.
//
// Deprecated: Use `NpmPublishOptions` instead.
PublishTools *workflows.Tools `field:"optional" json:"publishTools" yaml:"publishTools"`
// Options for publishing npm package to AWS CodeArtifact.
// Default: - undefined.
//
// Deprecated: Use `NpmPublishOptions` instead.
CodeArtifactOptions *CodeArtifactOptions `field:"optional" json:"codeArtifactOptions" yaml:"codeArtifactOptions"`
// 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".
//
// Deprecated: Use `npmDistTag` for each release branch instead.
DistTag *string `field:"optional" json:"distTag" yaml:"distTag"`
// 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.
// See: https://docs.npmjs.com/generating-provenance-statements
//
// Default: - undefined.
//
// Deprecated: Use `NpmPublishOptions` instead.
NpmProvenance *bool `field:"optional" json:"npmProvenance" yaml:"npmProvenance"`
// 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`.
//
// Deprecated: Use `NpmPublishOptions` instead.
NpmTokenSecret *string `field:"optional" json:"npmTokenSecret" yaml:"npmTokenSecret"`
// 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"
//
// Default: "registry.npmjs.org"
//
// Deprecated: Use `NpmPublishOptions` instead.
Registry *string `field:"optional" json:"registry" yaml:"registry"`
}
Deprecated: Use `NpmPublishOptions` instead.
type JsiiReleaseNuget
deprecated
type JsiiReleaseNuget struct {
// 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`.
// Deprecated: Use `NugetPublishOptions` instead.
PostPublishSteps *[]*workflows.JobStep `field:"optional" json:"postPublishSteps" yaml:"postPublishSteps"`
// 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`.
// Deprecated: Use `NugetPublishOptions` instead.
PrePublishSteps *[]*workflows.JobStep `field:"optional" json:"prePublishSteps" yaml:"prePublishSteps"`
// Additional tools to install in the publishing job.
// Default: - no additional tools are installed.
//
// Deprecated: Use `NugetPublishOptions` instead.
PublishTools *workflows.Tools `field:"optional" json:"publishTools" yaml:"publishTools"`
// GitHub secret which contains the API key for NuGet.
// Default: "NUGET_API_KEY".
//
// Deprecated: Use `NugetPublishOptions` instead.
NugetApiKeySecret *string `field:"optional" json:"nugetApiKeySecret" yaml:"nugetApiKeySecret"`
// NuGet Server URL (defaults to nuget.org).
// Deprecated: Use `NugetPublishOptions` instead.
NugetServer *string `field:"optional" json:"nugetServer" yaml:"nugetServer"`
}
Deprecated: Use `NugetPublishOptions` instead.
type JsiiReleasePyPi
deprecated
type JsiiReleasePyPi struct {
// 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`.
// Deprecated: Use `PyPiPublishOptions` instead.
PostPublishSteps *[]*workflows.JobStep `field:"optional" json:"postPublishSteps" yaml:"postPublishSteps"`
// 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`.
// Deprecated: Use `PyPiPublishOptions` instead.
PrePublishSteps *[]*workflows.JobStep `field:"optional" json:"prePublishSteps" yaml:"prePublishSteps"`
// Additional tools to install in the publishing job.
// Default: - no additional tools are installed.
//
// Deprecated: Use `PyPiPublishOptions` instead.
PublishTools *workflows.Tools `field:"optional" json:"publishTools" yaml:"publishTools"`
// Options for publishing to AWS CodeArtifact.
// Default: - undefined.
//
// Deprecated: Use `PyPiPublishOptions` instead.
CodeArtifactOptions *CodeArtifactOptions `field:"optional" json:"codeArtifactOptions" yaml:"codeArtifactOptions"`
// The GitHub secret which contains PyPI password.
// Default: "TWINE_PASSWORD".
//
// Deprecated: Use `PyPiPublishOptions` instead.
TwinePasswordSecret *string `field:"optional" json:"twinePasswordSecret" yaml:"twinePasswordSecret"`
// The registry url to use when releasing packages.
// Default: - twine default.
//
// Deprecated: Use `PyPiPublishOptions` instead.
TwineRegistryUrl *string `field:"optional" json:"twineRegistryUrl" yaml:"twineRegistryUrl"`
// The GitHub secret which contains PyPI user name.
// Default: "TWINE_USERNAME".
//
// Deprecated: Use `PyPiPublishOptions` instead.
TwineUsernameSecret *string `field:"optional" json:"twineUsernameSecret" yaml:"twineUsernameSecret"`
}
Deprecated: Use `PyPiPublishOptions` instead.
type ManualReleaseOptions ¶
type ManualReleaseOptions struct {
// Maintain a project-level changelog.
// Default: true.
//
// Experimental.
Changelog *bool `field:"optional" json:"changelog" yaml:"changelog"`
// Project-level changelog file path.
//
// Ignored if `changelog` is false.
// Default: 'CHANGELOG.md'
//
// Experimental.
ChangelogPath *string `field:"optional" json:"changelogPath" yaml:"changelogPath"`
// Override git-push command.
//
// Set to an empty string to disable pushing.
// Experimental.
GitPushCommand *string `field:"optional" json:"gitPushCommand" yaml:"gitPushCommand"`
}
Experimental.
type MavenPublishOptions ¶
type MavenPublishOptions struct {
// 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`.
// Experimental.
PostPublishSteps *[]*workflows.JobStep `field:"optional" json:"postPublishSteps" yaml:"postPublishSteps"`
// 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`.
// Experimental.
PrePublishSteps *[]*workflows.JobStep `field:"optional" json:"prePublishSteps" yaml:"prePublishSteps"`
// Additional tools to install in the publishing job.
// Default: - no additional tools are installed.
//
// Experimental.
PublishTools *workflows.Tools `field:"optional" json:"publishTools" yaml:"publishTools"`
// URL of Nexus repository.
//
// if not set, defaults to https://oss.sonatype.org
// Default: "https://oss.sonatype.org"
//
// Experimental.
MavenEndpoint *string `field:"optional" json:"mavenEndpoint" yaml:"mavenEndpoint"`
// GitHub secret name which contains the GPG private key or file that includes it.
//
// This is used to sign your Maven packages. See instructions.
// See: https://github.com/aws/publib#maven
//
// Default: "MAVEN_GPG_PRIVATE_KEY_PASSPHRASE" or not set when using GitHub Packages.
//
// Experimental.
MavenGpgPrivateKeyPassphrase *string `field:"optional" json:"mavenGpgPrivateKeyPassphrase" yaml:"mavenGpgPrivateKeyPassphrase"`
// GitHub secret name which contains the GPG private key or file that includes it.
//
// This is used to sign your Maven
// packages. See instructions.
// See: https://github.com/aws/publib#maven
//
// Default: "MAVEN_GPG_PRIVATE_KEY" or not set when using GitHub Packages.
//
// Experimental.
MavenGpgPrivateKeySecret *string `field:"optional" json:"mavenGpgPrivateKeySecret" yaml:"mavenGpgPrivateKeySecret"`
// 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).
// See: https://issues.sonatype.org/secure/CreateIssue.jspa?issuetype=21&pid=10134
//
// Default: "MAVEN_PASSWORD" or "GITHUB_TOKEN" when using GitHub Packages.
//
// Experimental.
MavenPassword *string `field:"optional" json:"mavenPassword" yaml:"mavenPassword"`
// Deployment repository when not deploying to Maven Central.
// Default: - not set.
//
// Experimental.
MavenRepositoryUrl *string `field:"optional" json:"mavenRepositoryUrl" yaml:"mavenRepositoryUrl"`
// 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.
//
// Experimental.
MavenServerId *string `field:"optional" json:"mavenServerId" yaml:"mavenServerId"`
// 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.
//
// Experimental.
MavenStagingProfileId *string `field:"optional" json:"mavenStagingProfileId" yaml:"mavenStagingProfileId"`
// 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).
// See: https://issues.sonatype.org/secure/CreateIssue.jspa?issuetype=21&pid=10134
//
// Default: "MAVEN_USERNAME" or the GitHub Actor when using GitHub Packages.
//
// Experimental.
MavenUsername *string `field:"optional" json:"mavenUsername" yaml:"mavenUsername"`
}
Options for Maven releases. Experimental.
type NpmPublishOptions ¶
type NpmPublishOptions struct {
// 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`.
// Experimental.
PostPublishSteps *[]*workflows.JobStep `field:"optional" json:"postPublishSteps" yaml:"postPublishSteps"`
// 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`.
// Experimental.
PrePublishSteps *[]*workflows.JobStep `field:"optional" json:"prePublishSteps" yaml:"prePublishSteps"`
// Additional tools to install in the publishing job.
// Default: - no additional tools are installed.
//
// Experimental.
PublishTools *workflows.Tools `field:"optional" json:"publishTools" yaml:"publishTools"`
// Options for publishing npm package to AWS CodeArtifact.
// Default: - undefined.
//
// Experimental.
CodeArtifactOptions *CodeArtifactOptions `field:"optional" json:"codeArtifactOptions" yaml:"codeArtifactOptions"`
// 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".
//
// Deprecated: Use `npmDistTag` for each release branch instead.
DistTag *string `field:"optional" json:"distTag" yaml:"distTag"`
// 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.
// See: https://docs.npmjs.com/generating-provenance-statements
//
// Default: - undefined.
//
// Experimental.
NpmProvenance *bool `field:"optional" json:"npmProvenance" yaml:"npmProvenance"`
// 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`.
//
// Experimental.
NpmTokenSecret *string `field:"optional" json:"npmTokenSecret" yaml:"npmTokenSecret"`
// 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"
//
// Default: "registry.npmjs.org"
//
// Experimental.
Registry *string `field:"optional" json:"registry" yaml:"registry"`
}
Options for npm release. Experimental.
type NugetPublishOptions ¶
type NugetPublishOptions struct {
// 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`.
// Experimental.
PostPublishSteps *[]*workflows.JobStep `field:"optional" json:"postPublishSteps" yaml:"postPublishSteps"`
// 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`.
// Experimental.
PrePublishSteps *[]*workflows.JobStep `field:"optional" json:"prePublishSteps" yaml:"prePublishSteps"`
// Additional tools to install in the publishing job.
// Default: - no additional tools are installed.
//
// Experimental.
PublishTools *workflows.Tools `field:"optional" json:"publishTools" yaml:"publishTools"`
// GitHub secret which contains the API key for NuGet.
// Default: "NUGET_API_KEY".
//
// Experimental.
NugetApiKeySecret *string `field:"optional" json:"nugetApiKeySecret" yaml:"nugetApiKeySecret"`
// NuGet Server URL (defaults to nuget.org).
// Experimental.
NugetServer *string `field:"optional" json:"nugetServer" yaml:"nugetServer"`
}
Options for NuGet releases. Experimental.
type Publisher ¶
type Publisher interface {
projen.Component
// Experimental.
ArtifactName() *string
// Experimental.
BuildJobId() *string
// Experimental.
Condition() *string
// Deprecated: use `publibVersion`.
JsiiReleaseVersion() *string
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Experimental.
PublibVersion() *string
// Adds post publishing steps for the GitHub release job.
// Experimental.
AddGitHubPostPublishingSteps(steps ...*workflows.JobStep)
// Adds pre publishing steps for the GitHub release job.
// Experimental.
AddGitHubPrePublishingSteps(steps ...*workflows.JobStep)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Publish to git.
//
// This includes generating a project-level changelog and release tags.
// Experimental.
PublishToGit(options *GitPublishOptions) projen.Task
// Creates a GitHub Release.
// Experimental.
PublishToGitHubReleases(options *GitHubReleasesPublishOptions)
// Adds a go publishing job.
// Experimental.
PublishToGo(options *GoPublishOptions)
// Publishes artifacts from `java/**` to Maven.
// Experimental.
PublishToMaven(options *MavenPublishOptions)
// Publishes artifacts from `js/**` to npm.
// Experimental.
PublishToNpm(options *NpmPublishOptions)
// Publishes artifacts from `dotnet/**` to NuGet Gallery.
// Experimental.
PublishToNuget(options *NugetPublishOptions)
// Publishes wheel artifacts from `python` to PyPI.
// Experimental.
PublishToPyPi(options *PyPiPublishOptions)
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Implements GitHub jobs for publishing modules to package managers.
Under the hood, it uses https://github.com/aws/publib Experimental.
func NewPublisher ¶
func NewPublisher(project projen.Project, options *PublisherOptions) Publisher
Experimental.
type PublisherOptions ¶
type PublisherOptions struct {
// 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).
// See: https://github.com/aws/publib
//
// Experimental.
ArtifactName *string `field:"required" json:"artifactName" yaml:"artifactName"`
// The job ID that produces the build artifacts.
//
// All publish jobs will take a dependency on this job.
// Experimental.
BuildJobId *string `field:"required" json:"buildJobId" yaml:"buildJobId"`
// A GitHub workflow expression used as a condition for publishers.
// Default: - no condition.
//
// Experimental.
Condition *string `field:"optional" json:"condition" yaml:"condition"`
// 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.
// Experimental.
DryRun *bool `field:"optional" json:"dryRun" yaml:"dryRun"`
// Create an issue when a publish task fails.
// Default: false.
//
// Experimental.
FailureIssue *bool `field:"optional" json:"failureIssue" yaml:"failureIssue"`
// The label to apply to the issue marking failed publish tasks.
//
// Only applies if `failureIssue` is true.
// Default: "failed-release".
//
// Experimental.
FailureIssueLabel *string `field:"optional" json:"failureIssueLabel" yaml:"failureIssueLabel"`
// Deprecated: use `publibVersion` instead.
JsiiReleaseVersion *string `field:"optional" json:"jsiiReleaseVersion" yaml:"jsiiReleaseVersion"`
// Version requirement for `publib`.
// Default: "latest".
//
// Experimental.
PublibVersion *string `field:"optional" json:"publibVersion" yaml:"publibVersion"`
// 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.
//
// Experimental.
PublishTasks *bool `field:"optional" json:"publishTasks" yaml:"publishTasks"`
// Container image to use for GitHub workflows.
// Default: - default image.
//
// Experimental.
WorkflowContainerImage *string `field:"optional" json:"workflowContainerImage" yaml:"workflowContainerImage"`
// 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/*.
//
// Experimental.
WorkflowNodeVersion *string `field:"optional" json:"workflowNodeVersion" yaml:"workflowNodeVersion"`
// Github Runner selection labels.
// Default: ["ubuntu-latest"].
//
// Experimental.
WorkflowRunsOn *[]*string `field:"optional" json:"workflowRunsOn" yaml:"workflowRunsOn"`
// Github Runner Group selection options.
// Experimental.
WorkflowRunsOnGroup *projen.GroupRunnerOptions `field:"optional" json:"workflowRunsOnGroup" yaml:"workflowRunsOnGroup"`
}
Options for `Publisher`. Experimental.
type PyPiPublishOptions ¶
type PyPiPublishOptions struct {
// 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`.
// Experimental.
PostPublishSteps *[]*workflows.JobStep `field:"optional" json:"postPublishSteps" yaml:"postPublishSteps"`
// 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`.
// Experimental.
PrePublishSteps *[]*workflows.JobStep `field:"optional" json:"prePublishSteps" yaml:"prePublishSteps"`
// Additional tools to install in the publishing job.
// Default: - no additional tools are installed.
//
// Experimental.
PublishTools *workflows.Tools `field:"optional" json:"publishTools" yaml:"publishTools"`
// Options for publishing to AWS CodeArtifact.
// Default: - undefined.
//
// Experimental.
CodeArtifactOptions *CodeArtifactOptions `field:"optional" json:"codeArtifactOptions" yaml:"codeArtifactOptions"`
// The GitHub secret which contains PyPI password.
// Default: "TWINE_PASSWORD".
//
// Experimental.
TwinePasswordSecret *string `field:"optional" json:"twinePasswordSecret" yaml:"twinePasswordSecret"`
// The registry url to use when releasing packages.
// Default: - twine default.
//
// Experimental.
TwineRegistryUrl *string `field:"optional" json:"twineRegistryUrl" yaml:"twineRegistryUrl"`
// The GitHub secret which contains PyPI user name.
// Default: "TWINE_USERNAME".
//
// Experimental.
TwineUsernameSecret *string `field:"optional" json:"twineUsernameSecret" yaml:"twineUsernameSecret"`
}
Options for PyPI release. Experimental.
type Release ¶
type Release interface {
projen.Component
// Location of build artifacts.
// Experimental.
ArtifactsDirectory() *string
// Retrieve all release branch names.
// Experimental.
Branches() *[]*string
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Package publisher.
// Experimental.
Publisher() Publisher
// 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.
// Experimental.
AddBranch(branch *string, options *BranchOptions)
// Adds jobs to all release workflows.
// Experimental.
AddJobs(jobs *map[string]*workflows.Job)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Manages releases (currently through GitHub workflows).
By default, no branches are released. To add branches, call `addBranch()`. Experimental.
func NewRelease ¶
func NewRelease(scope constructs.IConstruct, options *ReleaseOptions) Release
Experimental.
func Release_Of ¶
Returns the `Release` component of a project or `undefined` if the project does not have a Release component. Experimental.
type ReleaseOptions ¶
type ReleaseOptions struct {
// 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".
//
// Experimental.
BumpPackage *string `field:"optional" json:"bumpPackage" yaml:"bumpPackage"`
// Version requirement of `publib` which is used to publish modules to npm.
// Default: "latest".
//
// Experimental.
JsiiReleaseVersion *string `field:"optional" json:"jsiiReleaseVersion" yaml:"jsiiReleaseVersion"`
// 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.
//
// Experimental.
MajorVersion *float64 `field:"optional" json:"majorVersion" yaml:"majorVersion"`
// 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.
//
// Experimental.
MinMajorVersion *float64 `field:"optional" json:"minMajorVersion" yaml:"minMajorVersion"`
// 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.
//
// 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.
//
// Experimental.
NextVersionCommand *string `field:"optional" json:"nextVersionCommand" yaml:"nextVersionCommand"`
// 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".
//
// Experimental.
NpmDistTag *string `field:"optional" json:"npmDistTag" yaml:"npmDistTag"`
// Steps to execute after build as part of the release workflow.
// Default: [].
//
// Experimental.
PostBuildSteps *[]*workflows.JobStep `field:"optional" json:"postBuildSteps" yaml:"postBuildSteps"`
// Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
// Default: - normal semantic versions.
//
// Experimental.
Prerelease *string `field:"optional" json:"prerelease" yaml:"prerelease"`
// Instead of actually publishing to package managers, just print the publishing command.
// Default: false.
//
// Experimental.
PublishDryRun *bool `field:"optional" json:"publishDryRun" yaml:"publishDryRun"`
// 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.
//
// Experimental.
PublishTasks *bool `field:"optional" json:"publishTasks" yaml:"publishTasks"`
// Find commits that should be considered releasable Used to decide if a release is required.
// Default: ReleasableCommits.everyCommit()
//
// Experimental.
ReleasableCommits projen.ReleasableCommits `field:"optional" json:"releasableCommits" yaml:"releasableCommits"`
// 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.
//
// Experimental.
ReleaseBranches *map[string]*BranchOptions `field:"optional" json:"releaseBranches" yaml:"releaseBranches"`
// Automatically release new versions every commit to one of branches in `releaseBranches`.
// Default: true.
//
// Deprecated: Use `releaseTrigger: ReleaseTrigger.continuous()` instead
ReleaseEveryCommit *bool `field:"optional" json:"releaseEveryCommit" yaml:"releaseEveryCommit"`
// Create a github issue on every failed publishing task.
// Default: false.
//
// Experimental.
ReleaseFailureIssue *bool `field:"optional" json:"releaseFailureIssue" yaml:"releaseFailureIssue"`
// The label to apply to issues indicating publish failures.
//
// Only applies if `releaseFailureIssue` is true.
// Default: "failed-release".
//
// Experimental.
ReleaseFailureIssueLabel *string `field:"optional" json:"releaseFailureIssueLabel" yaml:"releaseFailureIssueLabel"`
// CRON schedule to trigger new releases.
// Default: - no scheduled releases.
//
// Deprecated: Use `releaseTrigger: ReleaseTrigger.scheduled()` instead
ReleaseSchedule *string `field:"optional" json:"releaseSchedule" yaml:"releaseSchedule"`
// 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".
//
// Experimental.
ReleaseTagPrefix *string `field:"optional" json:"releaseTagPrefix" yaml:"releaseTagPrefix"`
// The release trigger to use.
// Default: - Continuous releases (`ReleaseTrigger.continuous()`)
//
// Experimental.
ReleaseTrigger ReleaseTrigger `field:"optional" json:"releaseTrigger" yaml:"releaseTrigger"`
// The name of the default release workflow.
// Default: "release".
//
// Experimental.
ReleaseWorkflowName *string `field:"optional" json:"releaseWorkflowName" yaml:"releaseWorkflowName"`
// A set of workflow steps to execute in order to setup the workflow container.
// Experimental.
ReleaseWorkflowSetupSteps *[]*workflows.JobStep `field:"optional" json:"releaseWorkflowSetupSteps" yaml:"releaseWorkflowSetupSteps"`
// 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.
//
// Experimental.
VersionrcOptions *map[string]interface{} `field:"optional" json:"versionrcOptions" yaml:"versionrcOptions"`
// Container image to use for GitHub workflows.
// Default: - default image.
//
// Experimental.
WorkflowContainerImage *string `field:"optional" json:"workflowContainerImage" yaml:"workflowContainerImage"`
// Github Runner selection labels.
// Default: ["ubuntu-latest"].
//
// Experimental.
WorkflowRunsOn *[]*string `field:"optional" json:"workflowRunsOn" yaml:"workflowRunsOn"`
// Github Runner Group selection options.
// Experimental.
WorkflowRunsOnGroup *projen.GroupRunnerOptions `field:"optional" json:"workflowRunsOnGroup" yaml:"workflowRunsOnGroup"`
// A directory which will contain build artifacts.
// Default: "dist".
//
// Experimental.
ArtifactsDirectory *string `field:"required" json:"artifactsDirectory" yaml:"artifactsDirectory"`
// 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()`.
// Experimental.
Branch *string `field:"required" json:"branch" yaml:"branch"`
// 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.
// Experimental.
Task projen.Task `field:"required" json:"task" yaml:"task"`
// A name of a .json file to set the `version` field in after a bump.
//
// Example:
// "package.json"
//
// Experimental.
VersionFile *string `field:"required" json:"versionFile" yaml:"versionFile"`
// Create a GitHub release for each release.
// Default: true.
//
// Experimental.
GithubRelease *bool `field:"optional" json:"githubRelease" yaml:"githubRelease"`
// 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/*"".
//
// Experimental.
WorkflowNodeVersion *string `field:"optional" json:"workflowNodeVersion" yaml:"workflowNodeVersion"`
// Permissions granted to the release workflow job.
// Default: `{ contents: JobPermission.WRITE }`
//
// Experimental.
WorkflowPermissions *workflows.JobPermissions `field:"optional" json:"workflowPermissions" yaml:"workflowPermissions"`
}
Options for `Release`. Experimental.
type ReleaseProjectOptions ¶
type ReleaseProjectOptions struct {
// 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".
//
// Experimental.
BumpPackage *string `field:"optional" json:"bumpPackage" yaml:"bumpPackage"`
// Version requirement of `publib` which is used to publish modules to npm.
// Default: "latest".
//
// Experimental.
JsiiReleaseVersion *string `field:"optional" json:"jsiiReleaseVersion" yaml:"jsiiReleaseVersion"`
// 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.
//
// Experimental.
MajorVersion *float64 `field:"optional" json:"majorVersion" yaml:"majorVersion"`
// 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.
//
// Experimental.
MinMajorVersion *float64 `field:"optional" json:"minMajorVersion" yaml:"minMajorVersion"`
// 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.
//
// 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.
//
// Experimental.
NextVersionCommand *string `field:"optional" json:"nextVersionCommand" yaml:"nextVersionCommand"`
// 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".
//
// Experimental.
NpmDistTag *string `field:"optional" json:"npmDistTag" yaml:"npmDistTag"`
// Steps to execute after build as part of the release workflow.
// Default: [].
//
// Experimental.
PostBuildSteps *[]*workflows.JobStep `field:"optional" json:"postBuildSteps" yaml:"postBuildSteps"`
// Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
// Default: - normal semantic versions.
//
// Experimental.
Prerelease *string `field:"optional" json:"prerelease" yaml:"prerelease"`
// Instead of actually publishing to package managers, just print the publishing command.
// Default: false.
//
// Experimental.
PublishDryRun *bool `field:"optional" json:"publishDryRun" yaml:"publishDryRun"`
// 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.
//
// Experimental.
PublishTasks *bool `field:"optional" json:"publishTasks" yaml:"publishTasks"`
// Find commits that should be considered releasable Used to decide if a release is required.
// Default: ReleasableCommits.everyCommit()
//
// Experimental.
ReleasableCommits projen.ReleasableCommits `field:"optional" json:"releasableCommits" yaml:"releasableCommits"`
// 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.
//
// Experimental.
ReleaseBranches *map[string]*BranchOptions `field:"optional" json:"releaseBranches" yaml:"releaseBranches"`
// Automatically release new versions every commit to one of branches in `releaseBranches`.
// Default: true.
//
// Deprecated: Use `releaseTrigger: ReleaseTrigger.continuous()` instead
ReleaseEveryCommit *bool `field:"optional" json:"releaseEveryCommit" yaml:"releaseEveryCommit"`
// Create a github issue on every failed publishing task.
// Default: false.
//
// Experimental.
ReleaseFailureIssue *bool `field:"optional" json:"releaseFailureIssue" yaml:"releaseFailureIssue"`
// The label to apply to issues indicating publish failures.
//
// Only applies if `releaseFailureIssue` is true.
// Default: "failed-release".
//
// Experimental.
ReleaseFailureIssueLabel *string `field:"optional" json:"releaseFailureIssueLabel" yaml:"releaseFailureIssueLabel"`
// CRON schedule to trigger new releases.
// Default: - no scheduled releases.
//
// Deprecated: Use `releaseTrigger: ReleaseTrigger.scheduled()` instead
ReleaseSchedule *string `field:"optional" json:"releaseSchedule" yaml:"releaseSchedule"`
// 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".
//
// Experimental.
ReleaseTagPrefix *string `field:"optional" json:"releaseTagPrefix" yaml:"releaseTagPrefix"`
// The release trigger to use.
// Default: - Continuous releases (`ReleaseTrigger.continuous()`)
//
// Experimental.
ReleaseTrigger ReleaseTrigger `field:"optional" json:"releaseTrigger" yaml:"releaseTrigger"`
// The name of the default release workflow.
// Default: "release".
//
// Experimental.
ReleaseWorkflowName *string `field:"optional" json:"releaseWorkflowName" yaml:"releaseWorkflowName"`
// A set of workflow steps to execute in order to setup the workflow container.
// Experimental.
ReleaseWorkflowSetupSteps *[]*workflows.JobStep `field:"optional" json:"releaseWorkflowSetupSteps" yaml:"releaseWorkflowSetupSteps"`
// 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.
//
// Experimental.
VersionrcOptions *map[string]interface{} `field:"optional" json:"versionrcOptions" yaml:"versionrcOptions"`
// Container image to use for GitHub workflows.
// Default: - default image.
//
// Experimental.
WorkflowContainerImage *string `field:"optional" json:"workflowContainerImage" yaml:"workflowContainerImage"`
// Github Runner selection labels.
// Default: ["ubuntu-latest"].
//
// Experimental.
WorkflowRunsOn *[]*string `field:"optional" json:"workflowRunsOn" yaml:"workflowRunsOn"`
// Github Runner Group selection options.
// Experimental.
WorkflowRunsOnGroup *projen.GroupRunnerOptions `field:"optional" json:"workflowRunsOnGroup" yaml:"workflowRunsOnGroup"`
}
Project options for release. Experimental.
type ReleaseTrigger ¶
type ReleaseTrigger interface {
// Project-level changelog file path.
// Experimental.
ChangelogPath() *string
// Override git-push command used when releasing manually.
//
// Set to an empty string to disable pushing.
// Experimental.
GitPushCommand() *string
// Whether or not this is a continuous release.
// Experimental.
IsContinuous() *bool
// Whether or not this is a release trigger with a manual task run in a working copy.
//
// If the `ReleaseTrigger` is a GitHub-only manual task, this will return `false`.
// Experimental.
IsManual() *bool
// Paths for which pushes will trigger a release when `isContinuous` is `true`.
// Experimental.
Paths() *[]*string
// Cron schedule for releases.
//
// Only defined if this is a scheduled release.
//
// Example:
// '0 17 * * *' - every day at 5 pm
//
// Experimental.
Schedule() *string
}
Used to manage release strategies.
This includes release and release artifact automation. Experimental.
func ReleaseTrigger_Continuous ¶
func ReleaseTrigger_Continuous(options *ContinuousReleaseOptions) ReleaseTrigger
Creates a continuous release trigger.
Automated releases will occur on every commit. Experimental.
func ReleaseTrigger_Manual ¶
func ReleaseTrigger_Manual(options *ManualReleaseOptions) ReleaseTrigger
Creates a manual release trigger.
Use this option if you want totally manual releases.
This will give you a release task that, in addition to the normal release activities will trigger a `publish:git` task. This task will handle project-level changelog management, release tagging, and pushing these artifacts to origin.
The command used for pushing can be customised by specifying `gitPushCommand`. Set to an empty string to disable pushing entirely.
Simply run `yarn release` to trigger a manual release. Experimental.
func ReleaseTrigger_Scheduled ¶
func ReleaseTrigger_Scheduled(options *ScheduledReleaseOptions) ReleaseTrigger
Creates a scheduled release trigger.
Automated releases will occur based on the provided cron schedule. Experimental.
func ReleaseTrigger_WorkflowDispatch ¶ added in v0.91.10
func ReleaseTrigger_WorkflowDispatch() ReleaseTrigger
The release can only be triggered using the GitHub UI. Experimental.
type ScheduledReleaseOptions ¶
type ScheduledReleaseOptions struct {
// Cron schedule for releases.
//
// Only defined if this is a scheduled release.
//
// Example:
// '0 17 * * *' - every day at 5 pm
//
// Experimental.
Schedule *string `field:"required" json:"schedule" yaml:"schedule"`
}
Experimental.
Source Files
¶
- BranchOptions.go
- CodeArtifactAuthProvider.go
- CodeArtifactOptions.go
- CommonPublishOptions.go
- ContinuousReleaseOptions.go
- GitHubReleasesPublishOptions.go
- GitPublishOptions.go
- GoPublishOptions.go
- JsiiReleaseGo.go
- JsiiReleaseMaven.go
- JsiiReleaseNpm.go
- JsiiReleaseNuget.go
- JsiiReleasePyPi.go
- ManualReleaseOptions.go
- MavenPublishOptions.go
- NpmPublishOptions.go
- NugetPublishOptions.go
- Publisher.go
- PublisherOptions.go
- Publisher__checks.go
- PyPiPublishOptions.go
- Release.go
- ReleaseOptions.go
- ReleaseProjectOptions.go
- ReleaseTrigger.go
- ReleaseTrigger__checks.go
- Release__checks.go
- ScheduledReleaseOptions.go
- main.go