Skip to content

Commit

Permalink
chore: update .projenrc.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
xiehan authored Oct 19, 2023
1 parent d27e5a3 commit 00cf388
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ const constructVersion = "^10.0.107";
const name = "cdktf-multi-stack-tfe";

const githubActionPinnedVersions = {
"actions/checkout": "c85c95e3d7251135ab7dc9ce3241c5835cc595a9", // v3.5.3
"actions/checkout": "8ade135a41bc03ea155e62e844d188df1ea18608", // v4.1.0
"actions/download-artifact": "9bc31d5ccc31df68ecc42ccf4149144866c47d8a", // v3.0.2
"actions/github-script": "d7906e4ad0b1822421a7e6a35d5ca353c962f410", // v6.4.1
"actions/setup-node": "64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c", // v3.6.0
"actions/upload-artifact": "0b7f8abb1508181956e8e162db84b466c27e18ce", // v3.1.2
"actions/setup-node": "5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d", // v3.8.1
"actions/upload-artifact": "a8a3f3ad30e3422c9c7b888a15615d19a852ae32", // v3.1.3
"amannn/action-semantic-pull-request":
"c3cd5d1ea3580753008872425915e343e351ab54", // v5.2.0
"peter-evans/create-pull-request": "284f54f989303d2699d373481a0cfa13ad5a6666", // v5.0.1
"47b15d52c5c30e94a17ec87eb8dd51ff5221fed9", // v5.3.0
"peter-evans/create-pull-request": "153407881ec5c347639a548ade7d8ad1d6740e38", // v5.0.2
};

const project = new ConstructLibraryCdktf({
Expand Down Expand Up @@ -75,6 +75,12 @@ project.testTask.exec(`npx cdktf synth`, {
project.gitignore.include("examples/typescript/tsconfig.json");
project.jest?.addIgnorePattern("dist");

project.addPackageIgnore("scripts");
project.addPackageIgnore("examples");
project.addPackageIgnore("projenrc");
project.addPackageIgnore("/.projenrc.ts");

project.addPackageIgnore(".copywrite.hcl");
// Run copywrite tool to add copyright headers to all files
project.buildWorkflow?.addPostBuildSteps(
{
Expand All @@ -89,4 +95,19 @@ Object.entries(githubActionPinnedVersions).forEach(([action, sha]) => {
project.github?.actions.set(action, `${action}@${sha}`);
});

const releaseWorkflow = project.tryFindObjectFile(
".github/workflows/release.yml"
);
releaseWorkflow?.addOverride("on.push", {
branches: ["main"],
"paths-ignore": [
// don't do a release if the change was only to these files/directories
"examples/**",
".github/ISSUE_TEMPLATE/**",
".github/CODEOWNERS",
".github/dependabot.yml",
".github/**/*.md",
],
});

project.synth();

0 comments on commit 00cf388

Please sign in to comment.