How to Become A Programming Polyglot by One-language Effort

1. Introduction
2. Preparation
2.1 Initialize a projen project
2.2 Figure out each projen command and arguments in AwsCdkConstructLibrary
2.3 Build a construct library
3. Publishing to supported language repositories
3.1 How to publish a package in npm?
- Arguments in the .projenrc.js you need to give attention to
- Required information by Github Actions
3.2 How to publish a package to PyPi?
- Arguments in .projenrc.js you need to give attention to
- Required information by Github Actions
3.3 How to publish a package to Maven?
- Arguments in the .projenrc.js you need to give attention to
- Few more steps for Maven
- Required information by Github Actions
3.4 How to publish a package to Nuget?
- Arguments in the .projenrc.js you need to give attention to
- required information by Github Actions
4. Conclusion
Required Secrets by Github Actions in order to Publish Construct Library in Maven, PyPI, npm, and NuGet

Introduction

Preparation

$ npx projen new awscdk-construct
$ alias pj='npx projen' // I moved it into ~/.bash_profile on my M1.
State Machine Diagram Generated by CDK Example

Publishing to supported language repositories

new AwsCdkConstructLibrary({
.
.
.
releaseToNpm: true,
releaseBranches: ['main'],
releaseWorkflow: true,
releaseEveryCommit: true
.
.
.
})
Email Message after Publishing an npm package via projen with success
publishToPypi: {    
distName: 'scotthsieh_projen_statemachine',
module: 'scotthsieh_projen_statemachine'
}
Python Package in Your PyPI Account after a Successful CICD by Github Actions.
publishToMaven: {
mavenGroupId: 'io.github.hsiehshujeng',
mavenArtifactId: 'projen-inception',
javaPackage: 'io.github.hsiehshujeng.projen.inception',
mavenEndpoint: 'https://s01.oss.sonatype.org' // check https://central.sonatype.org/publish/release/#login-into-ossrh
},
echo $(cat -e private.pem) | sed 's/\$ /\\n/g' | sed 's/\$$//'
Java Package Searched with io.github.hsiehshujeng after a Successful CICD by Github Actions.
Search Result at Maven Central Repository Search
publishToNuget: {
dotNetNamespace: 'ScottHsieh.Examples',
packageId: 'Projen.Inception',
},
Received Email Message after Publishing a NuGet package via projen with success

Conclusion

Packages Output to Supported Language Repositories with Success
A Glimpse of Successful Deployments via Different Programming Languages

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store