diff --git a/.github/workflows/force-release.yml b/.github/workflows/force-release.yml index bf4aeb9ce59..cad7dd8eec8 100644 --- a/.github/workflows/force-release.yml +++ b/.github/workflows/force-release.yml @@ -5,12 +5,10 @@ on: workflow_dispatch: inputs: sha: - name: sha type: string required: true description: The sha of the commit to release publish_to_go: - name: publish_to_go type: boolean required: true description: Whether to publish to Go Repository diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26a99754753..c803810e868 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,13 +85,7 @@ jobs: npm deprecate @cdktf/provider-azurerm "See https://cdk.tf/imports for details on how to continue to use the azurerm provider in your CDK for Terraform (CDKTF) projects by generating the bindings locally." release_github: name: Publish to GitHub Releases - needs: - - release - - release_npm - - release_maven - - release_pypi - - release_nuget - - release_golang + needs: release runs-on: custom-linux-medium permissions: contents: write diff --git a/.projen/deps.json b/.projen/deps.json index b0106f631ae..508cbc24c4f 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -1,5 +1,13 @@ { "dependencies": [ + { + "name": "@action-validator/cli", + "type": "build" + }, + { + "name": "@action-validator/core", + "type": "build" + }, { "name": "@actions/core", "version": "^1.1.0", diff --git a/.projen/tasks.json b/.projen/tasks.json index 72fdac541e4..0385001c2f0 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -245,6 +245,9 @@ "name": "post-compile", "description": "Runs after successful compilation", "steps": [ + { + "spawn": "validate-workflows" + }, { "spawn": "docgen" } @@ -338,13 +341,13 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=jsii-diff,jsii-pacmak,projen" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=@action-validator/cli,@action-validator/core,jsii-diff,jsii-pacmak,projen" }, { "exec": "yarn install --check-files" }, { - "exec": "yarn upgrade @actions/core @cdktf/provider-project @types/node cdktf-cli cdktf constructs dot-prop jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii projen semver standard-version typescript" + "exec": "yarn upgrade @action-validator/cli @action-validator/core @actions/core @cdktf/provider-project @types/node cdktf-cli cdktf constructs dot-prop jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii projen semver standard-version typescript" }, { "exec": "npx projen" @@ -354,6 +357,15 @@ } ] }, + "validate-workflows": { + "name": "validate-workflows", + "description": "Lint the YAML files generated by Projen to define GitHub Actions and Workflows, checking them against published JSON schemas", + "steps": [ + { + "exec": "find ./.github/workflows -type f -name \"*.yml\" -print0 | xargs -0 -n 1 npx action-validator" + } + ] + }, "watch": { "name": "watch", "description": "Watch & compile in the background", diff --git a/package.json b/package.json index 60f5f10e093..462837aa040 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "unbump": "npx projen unbump", "unconditional-bump": "npx projen unconditional-bump", "upgrade": "npx projen upgrade", + "validate-workflows": "npx projen validate-workflows", "watch": "npx projen watch", "projen": "npx projen", "commit": "git add -A && git commit -am \"Update provider\" || echo \"No changes to commit\"", @@ -44,6 +45,8 @@ "organization": true }, "devDependencies": { + "@action-validator/cli": "^0.6.0", + "@action-validator/core": "^0.6.0", "@actions/core": "^1.1.0", "@cdktf/provider-project": "^0.6.0", "@types/node": "^18", diff --git a/yarn.lock b/yarn.lock index 39d33f52686..fa6e49f1110 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,18 @@ # yarn lockfile v1 +"@action-validator/cli@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@action-validator/cli/-/cli-0.6.0.tgz#02a29e322d3794903896183281eed2b55c685851" + integrity sha512-Z8TYOK4GqUIpI0UuspUJPB6dhr0niTumhwI5iiZVqFRXm4u05bZawnFKltpvoFUfJg9mHbbIBlleqsRJAgl53Q== + dependencies: + chalk "5.2.0" + +"@action-validator/core@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@action-validator/core/-/core-0.6.0.tgz#8fbaf45562a5377140815b79cc1ac9f610ff63e5" + integrity sha512-tPglwCr8Mm8SWzwnVewwFmqRx91F0WvMsM0BRAqH4CLalyGndm53Xvp+UcUSzswpk1wkjIDYI7RyEhWMLyPkig== + "@actions/core@^1.1.0": version "1.10.1" resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.1.tgz#61108e7ac40acae95ee36da074fa5850ca4ced8a" @@ -219,9 +231,9 @@ glob "10.4.1" "@cdktf/provider-project@^0.6.0": - version "0.6.2" - resolved "https://registry.yarnpkg.com/@cdktf/provider-project/-/provider-project-0.6.2.tgz#07a72bb42bb6d0decb5ff24ffcdda053e9536174" - integrity sha512-09qMwNy8UEd6F2h3C2orDgzcQ3JdJCHipY86azneXIzqcaJW/cnCaRcOPAjSDAxkT2eoKzDpgARf4NYYKXrtXg== + version "0.6.5" + resolved "https://registry.yarnpkg.com/@cdktf/provider-project/-/provider-project-0.6.5.tgz#54e6e4e6542fccf9b7a131e7558eb8f60ee610ac" + integrity sha512-m7Scr2Kf+BmbFxR2aXc8TfsGfdsuTpjtqlIKI++lnoDICLi9ZB4LbAxFpcQssk+RUfQWwCWfa1xWeV4EALkFiQ== dependencies: change-case "^4.1.2" fs-extra "^10.1.0" @@ -1032,6 +1044,11 @@ chalk@4.1.2, chalk@^4, chalk@^4.1.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" + integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== + chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"