From 906f2ec28a4813d76509bb69ff7cd41acd2f791a Mon Sep 17 00:00:00 2001 From: Michael Haken Date: Mon, 16 Dec 2024 18:13:27 -0500 Subject: [PATCH] chore: update workflow (#31) * update * config updates --------- Co-authored-by: Michael Haken --- .gitattributes | 1 + .github/workflows/release.yml | 2 ++ .gitignore | 3 ++- .mergify.yml | 34 ++++++++++++++++++++++++++++++++++ .npmignore | 3 ++- .projen/deps.json | 6 ------ .projen/files.json | 1 + .projen/tasks.json | 4 ++-- .projenrc.ts | 8 ++++++-- package.json | 3 --- 10 files changed, 50 insertions(+), 15 deletions(-) create mode 100644 .mergify.yml diff --git a/.gitattributes b/.gitattributes index edc5148..36da90d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,6 +13,7 @@ /.github/workflows/upgrade-dev-deps-main.yml linguist-generated /.github/workflows/upgrade-main.yml linguist-generated /.gitignore linguist-generated +/.mergify.yml linguist-generated /.npmignore linguist-generated /.prettierignore linguist-generated /.prettierrc.json linguist-generated diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e86abf3..722a099 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -143,6 +143,8 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "20" + - name: " Install gpg-agent" + run: sudo dnf install --allowerasing gnupg2 - name: Download build artifacts uses: actions/download-artifact@v4 with: diff --git a/.gitignore b/.gitignore index 6f9ca42..a678427 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ !/.projen/tasks.json !/.projen/deps.json !/.projen/files.json +!/.github/workflows/auto-queue.yml !/.github/workflows/pull-request-lint.yml !/.github/workflows/auto-approve.yml !/package.json @@ -57,6 +58,7 @@ junit.xml /dist/changelog.md /dist/version.txt !/.github/workflows/release.yml +!/.mergify.yml !/.github/pull_request_template.md !/.prettierignore !/.prettierrc.json @@ -70,7 +72,6 @@ tsconfig.json !/API.md .jsii.tabl.json !/rosetta/default.ts-fixture -!/.github/workflows/auto-queue.yml !/.github/workflows/upgrade-cdklabs-projen-project-types-main.yml !/.github/workflows/upgrade-main.yml !/.github/workflows/upgrade-dev-deps-main.yml diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 0000000..9042e54 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,34 @@ +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". + +queue_rules: + - name: default + update_method: merge + conditions: + - "#approved-reviews-by>=1" + - -label~=(do-not-merge) + - status-success=build + - status-success=package-js + - status-success=package-java + - status-success=package-python + - status-success=package-dotnet + - status-success=package-go + merge_method: squash + commit_message_template: |- + {{ title }} (#{{ number }}) + + {{ body }} +pull_request_rules: + - name: Automatic merge on approval and successful build + actions: + delete_head_branch: {} + queue: + name: default + conditions: + - "#approved-reviews-by>=1" + - -label~=(do-not-merge) + - status-success=build + - status-success=package-js + - status-success=package-java + - status-success=package-python + - status-success=package-dotnet + - status-success=package-go diff --git a/.npmignore b/.npmignore index 98db8fc..0cf92b0 100644 --- a/.npmignore +++ b/.npmignore @@ -7,6 +7,8 @@ permissions-backup.acl /dist/changelog.md /dist/version.txt /.mergify.yml +/.prettierignore +/.prettierrc.json /test/ /tsconfig.dev.json /src/ @@ -20,7 +22,6 @@ dist /.idea/ /.projenrc.js tsconfig.tsbuildinfo -/.eslintrc.json !.jsii /.gitattributes /.projenrc.ts diff --git a/.projen/deps.json b/.projen/deps.json index 7537fd9..95e6d86 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -11,7 +11,6 @@ }, { "name": "aws-cdk-lib", - "version": "2.173.1", "type": "build" }, { @@ -27,11 +26,6 @@ "version": "^12", "type": "build" }, - { - "name": "constructs", - "version": "10.0.5", - "type": "build" - }, { "name": "jest", "type": "build" diff --git a/.projen/files.json b/.projen/files.json index 90ef6c5..6d56a4c 100644 --- a/.projen/files.json +++ b/.projen/files.json @@ -11,6 +11,7 @@ ".github/workflows/upgrade-dev-deps-main.yml", ".github/workflows/upgrade-main.yml", ".gitignore", + ".mergify.yml", ".prettierignore", ".prettierrc.json", ".projen/deps.json", diff --git a/.projen/tasks.json b/.projen/tasks.json index 5035704..4cd29f3 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -510,13 +510,13 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev --filter=@types/jest,cdk-nag,jest,jsii-diff,jsii-pacmak,jsii-rosetta,prettier,ts-jest,ts-node,typescript" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev --filter=@types/jest,aws-cdk-lib,cdk-nag,jest,jsii-diff,jsii-pacmak,jsii-rosetta,prettier,ts-jest,ts-node,typescript" }, { "exec": "yarn install --check-files" }, { - "exec": "yarn upgrade @types/jest @types/node aws-cdk-lib cdk-nag commit-and-tag-version constructs jest jest-junit jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii prettier ts-jest ts-node typescript @aws-cdk/integ-runner @aws-cdk/integ-tests-alpha" + "exec": "yarn upgrade @types/jest @types/node aws-cdk-lib cdk-nag commit-and-tag-version jest jest-junit jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii prettier ts-jest ts-node typescript @aws-cdk/integ-runner @aws-cdk/integ-tests-alpha" }, { "exec": "npx projen" diff --git a/.projenrc.ts b/.projenrc.ts index b1e816e..ef01fbe 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -18,15 +18,17 @@ const project = new CdklabsConstructLibrary ({ 'aws-cdk-lib', 'cdk-nag' ], + private: false, npmAccess: javascript.NpmAccess.PUBLIC, license: 'Apache-2.0', githubOptions: { mergify: true, + mergeQueue: true }, autoMerge: true, autoApproveUpgrades: true, autoApproveOptions: { - allowedUsernames: ['cdklabs-automation'], + allowedUsernames: ['cdklabs-automation', "hakenmt"], }, eslint: false, eslintOptions: { @@ -259,7 +261,9 @@ project.tasks.tryFind('release')?.updateStep(4, { project.github ?.tryFindWorkflow('release') ?.file?.patch(JsonPatch.remove('/jobs/release_pypi/steps/1')); -project.synth(); + project.github + ?.tryFindWorkflow('release') + ?.file?.patch(JsonPatch.add('/jobs/release_maven/steps/2', {"name": " Install gpg-agent", "run": "sudo dnf install --allowerasing gnupg2"})); project.github ?.tryFindWorkflow('build') diff --git a/package.json b/package.json index 7bd483f..cd2128d 100644 --- a/package.json +++ b/package.json @@ -103,8 +103,6 @@ "/@(src|test)/**/*(*.)@(spec|test).ts?(x)", "/@(src|test)/**/__tests__/**/*.ts?(x)", "/@(projenrc)/**/*(*.)@(spec|test).ts?(x)", - "/@(projenrc)/**/__tests__/**/*.ts?(x)", - "/@(projenrc)/**/*(*.)@(spec|test).ts?(x)", "/@(projenrc)/**/__tests__/**/*.ts?(x)" ], "clearMocks": true, @@ -174,6 +172,5 @@ "rootDir": "src" } }, - "private": true, "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." }