Skip to content

Commit

Permalink
Merge pull request #22 from MV-Consulting/feat/more-jsii-releases
Browse files Browse the repository at this point in the history
feat: add releases to pypi and golang
  • Loading branch information
mavogel authored Jan 25, 2025
2 parents c0cb367 + 3a8fc89 commit 9e4abef
Show file tree
Hide file tree
Showing 8 changed files with 287 additions and 4 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .github/workflows/pull-request-lint.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 85 additions & 0 deletions .github/workflows/release.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .mergify.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 30 additions & 2 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 67 additions & 1 deletion .projenrc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { awscdk } from 'projen';
import { awscdk, ReleasableCommits } from 'projen';
import { NpmAccess } from 'projen/lib/javascript';
const project = new awscdk.AwsCdkConstructLibrary({
author: 'Manuel Vogel',
Expand Down Expand Up @@ -50,6 +50,31 @@ const project = new awscdk.AwsCdkConstructLibrary({
'integ-tests/**/*.ts',
],
},
// see details for each: https://github.com/cdklabs/publib
// Go
publishToGo: {
moduleName: 'github.com/MV-Consulting/cdk-vscode-server',
githubTokenSecret: 'PROJEN_GITHUB_TOKEN',
},
// see https://github.com/cdklabs/publib/issues/1305
// Java
// publishToMaven: {
// javaPackage: 'io.github.mv-consulting.cdk.vscode.server',
// mavenGroupId: 'io.github.mv-consulting',
// mavenArtifactId: 'cdkvscodeserver',
// },

// Note: Microsoft Account needed
// C# and F# for .NET
// publishToNuget: {
// dotNetNamespace: 'MvConsulting',
// packageId: 'CdkVscodeServer',
// },
// Python
publishToPypi: {
distName: 'cdk-vscode-server',
module: 'cdk-vscode-server',
},
pullRequestTemplateContents: [`
**Please check if the PR fulfills these requirements**
- [ ] The commit message describes your change
Expand All @@ -74,6 +99,47 @@ const project = new awscdk.AwsCdkConstructLibrary({
- version of the construct: \`x.x.x\`
`],
// NOTE: issue templates are not supported yet. See https://github.com/projen/projen/pull/3648
// issueTemplates: {}

// See https://github.com/projen/projen/discussions/4040#discussioncomment-11905628
releasableCommits: ReleasableCommits.ofType([
'feat',
'fix',
'chore',
'refactor',
'perf',
]),
githubOptions: {
pullRequestLintOptions: {
semanticTitleOptions: {
types: [
// see commit types here: https://www.conventionalcommits.org/en/v1.0.0/#summary
'feat',
'fix',
'chore',
'refactor',
'perf',
'docs',
'style',
'test',
'build',
'ci',
],
},
},
},
versionrcOptions: {
types: [
{ type: 'feat', section: 'Features' },
{ type: 'fix', section: 'Bug Fixes' },
{ type: 'chore', section: 'Chores' },
{ type: 'docs', section: 'Docs' },
{ type: 'style', hidden: true },
{ type: 'refactor', hidden: true },
{ type: 'perf', section: 'Performance' },
{ type: 'test', hidden: true },
],
},
});

project.package.setScript('integ-test', 'integ-runner --directory ./integ-tests --parallel-regions eu-west-1 --parallel-regions eu-west-2 --update-on-failed');
Expand Down
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ To send us a pull request, please:
3. Ensure local tests pass -> `yarn run test`
4. The integ tests will run separately in the AWS account of the owner of the project.
5. Build the project -> `yarn run build` to also update the `API.md` file.
```bash
# do this within the container as we build jsii for multiple targets
docker run -it --rm -v $(pwd):/source -w /source --user 0:0 public.ecr.aws/jsii/superchain:1-bookworm-slim-node20 bash
# clean node_modules for fresh dependencies for the OS within the container
rm -rf node_modules
yarn install
# now build it
yarn run build
```
6. Commit to your fork using clear commit messages.
7. Send us a pull request, answering any default questions in the pull request interface.
8. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
Expand Down
12 changes: 11 additions & 1 deletion package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9e4abef

Please sign in to comment.