diff --git a/.gitattributes b/.gitattributes index 0d876456..dc921d87 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,21 +1,22 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". -/.gitattributes linguist-generated -/.github/pull_request_template.md linguist-generated -/.github/workflows/automerge.yml linguist-generated -/.github/workflows/build.yml linguist-generated -/.github/workflows/provider-upgrade.yml linguist-generated -/.github/workflows/release.yml linguist-generated -/.github/workflows/stale.yml linguist-generated -/.github/workflows/upgrade-main.yml linguist-generated -/.gitignore linguist-generated -/.npmignore linguist-generated -/.projen/** linguist-generated -/.projen/deps.json linguist-generated -/.projen/tasks.json linguist-generated -/cdktf.json linguist-generated -/LICENSE linguist-generated -/package.json linguist-generated -/README.md linguist-generated -/tsconfig.dev.json linguist-generated -/yarn.lock linguist-generated \ No newline at end of file +/.gitattributes linguist-generated +/.github/pull_request_template.md linguist-generated +/.github/workflows/automerge.yml linguist-generated +/.github/workflows/build.yml linguist-generated +/.github/workflows/provider-upgrade.yml linguist-generated +/.github/workflows/pull-request-lint.yml linguist-generated +/.github/workflows/release.yml linguist-generated +/.github/workflows/stale.yml linguist-generated +/.github/workflows/upgrade-main.yml linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/tasks.json linguist-generated +/cdktf.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/README.md linguist-generated +/tsconfig.dev.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/.github/workflows/pull-request-lint.yml b/.github/workflows/pull-request-lint.yml new file mode 100644 index 00000000..2945378d --- /dev/null +++ b/.github/workflows/pull-request-lint.yml @@ -0,0 +1,28 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +name: pull-request-lint +on: + pull_request_target: + types: + - labeled + - opened + - synchronize + - reopened + - ready_for_review + - edited +jobs: + validate: + name: Validate PR title + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: amannn/action-semantic-pull-request@v3.4.6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: |- + feat + fix + chore + requireScope: false diff --git a/.gitignore b/.gitignore index b065abdc..a8c8fb66 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ !/.gitattributes !/.projen/tasks.json !/.projen/deps.json +!/.github/workflows/pull-request-lint.yml !/.github/workflows/stale.yml !/package.json !/LICENSE diff --git a/.projen/tasks.json b/.projen/tasks.json index ca1ef88a..94e9c2a9 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -2,22 +2,25 @@ "tasks": { "build": { "name": "build", - "description": "Full release build (test+compile)", + "description": "Full release build", "steps": [ { - "exec": "npx projen" + "spawn": "default" }, { - "spawn": "test" + "spawn": "pre-compile" }, { "spawn": "compile" }, { - "spawn": "package" + "spawn": "post-compile" }, { - "spawn": "docgen" + "spawn": "test" + }, + { + "spawn": "package" } ] }, @@ -89,6 +92,7 @@ }, "default": { "name": "default", + "description": "Synthesize project files", "steps": [ { "exec": "node .projenrc.js" @@ -106,13 +110,26 @@ }, "package": { "name": "package", - "description": "Create an npm tarball", + "description": "Creates the distribution package", "steps": [ { "exec": "jsii-pacmak" } ] }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation", + "steps": [ + { + "spawn": "docgen" + } + ] + }, + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation" + }, "publish:github": { "name": "publish:github", "description": "Publish this package to GitHub Releases", diff --git a/package.json b/package.json index 65fc3ba8..4f8cf85a 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "default": "npx projen default", "docgen": "npx projen docgen", "package": "npx projen package", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", "publish:github": "npx projen publish:github", "publish:maven": "npx projen publish:maven", "publish:npm": "npx projen publish:npm", @@ -49,7 +51,7 @@ "jsii-docgen": "^1.8.110", "jsii-pacmak": "^1.44.0", "npm-check-updates": "^11", - "projen": "^0.32.6", + "projen": "^0.34.2", "standard-version": "^9", "typescript": "^4.4.4" }, diff --git a/yarn.lock b/yarn.lock index 5e9f3105..e7c47ea8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1632,7 +1632,7 @@ conventional-changelog-codemirror@^2.0.8: dependencies: q "^1.5.1" -conventional-changelog-config-spec@2.1.0: +conventional-changelog-config-spec@2.1.0, conventional-changelog-config-spec@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/conventional-changelog-config-spec/-/conventional-changelog-config-spec-2.1.0.tgz#874a635287ef8b581fd8558532bf655d4fb59f2d" integrity sha512-IpVePh16EbbB02V+UA+HQnnPIohgXvJRxHcS5+Uwk4AT5LjzCZJm5sp/yqs5C6KZJ1jMsV4paEV13BN1pvDuxQ== @@ -4622,14 +4622,15 @@ progress@^2.0.3: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -projen@^0.32.6: - version "0.32.6" - resolved "https://registry.yarnpkg.com/projen/-/projen-0.32.6.tgz#93662e9aa358abf0ecba79822925a8f471e41317" - integrity sha512-SwD30ix/5sl7jDtr/q15z6GImU8799SFiSI6ptQFDq2OLhSRqCAf5CXz+RIfdgyY3opC4hRlO1tddL1nFj9fEA== +projen@^0.34.2: + version "0.34.2" + resolved "https://registry.yarnpkg.com/projen/-/projen-0.34.2.tgz#3cff07f50d06c5b3fc28e21bb37e136f85884c89" + integrity sha512-Nnio2kyWPI0mxghyEbwmoyGvib4Vs0vSrg7/+t2eQe0W0/tr2nns/WZhNZEcyQtqF34wBkkkiwwu2nfha4eXYg== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3" chalk "^4.1.2" + conventional-changelog-config-spec "^2.1.0" fs-extra "^9.1.0" glob "^7" ini "^2.0.0"