Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/release.yml

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

25 changes: 24 additions & 1 deletion .projenrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { SourceCode, web } = require("projen");
const { web } = require("projen");
const { workflows } = require("projen/lib/github");

const project = new web.ReactTypeScriptProject({
defaultReleaseBranch: "main",
Expand Down Expand Up @@ -234,6 +235,28 @@ rewireCRA(buildTask);
rewireCRA(project.tasks.tryFind("test"));
rewireCRA(project.tasks.tryFind("dev"));

// trigger construct-hub to pick up changes from construct-hub-webapp
// whenever a new release is made
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add this as a projen feature!

project.release.triggerUpgrade('cdklabs/construct-hub', {
  githubToken: ...
})

project.release.addJobs({
upgrade_construct_hub: {
name: "Upgrade construct-hub",
runsOn: "ubuntu-latest",
permissions: {
actions: workflows.JobPermission.WRITE,
},
needs: ["release", "release_github", "release_npm"],
steps: [
{
name: "Trigger upgrade workflow",
run: 'gh api -X POST /repos/cdklabs/construct-hub/actions/workflows/upgrade-main.yml/dispatches --field ref="main"',
env: {
GITHUB_TOKEN: "${{ secrets.PROJEN_GITHUB_TOKEN }}",
},
},
],
},
});

project.synth();

/**
Expand Down