AvaliaSystems / dx-hub

DX Hub: ignite your Backstage Developer Portal
Apache License 2.0
9 stars 9 forks source link

Improve development workflow for DX Hub plugins #11

Open wasadigi opened 1 year ago

wasadigi commented 1 year ago

Context

The initial version of this repo was not designed to release the individual plugins we will add to DX Hub over time. We want to make these plugins available to Backstage adopters and therefore need a way to publish them via the central npm registry.

This question fits into the broader context of managing this repo as a "mono repo". Looking at the evolution and the current state of these repos, we see that there is no single approach:

Here are (some of) the repos that we have studied:

Approach

We will start with a simple solution and evolve it over time. The objectives of the first step are:

wasadigi commented 1 year ago

After digging into this topic, only using lerna does not seem to be enough. Running lerna version forces us to specify a new version for every package (even the packages that have not been modified).

We are going to use changesets and the companion GitHub action to help us. The main reason is that it is used both in the backstage/backstage and in the RoadieHQ/roadie-backstage-plugins repos (with different configurations...).

This article compares some alternatives to changesets: https://www.hamzak.xyz/blog-posts/release-management-for-nx-monorepos-semantic-release-vs-changesets-vs-release-it-

wasadigi commented 1 year ago

This is a great, short video about changesets and the companion GitHub action: https://www.youtube.com/watch?v=eh89VE3Mk5g

wasadigi commented 1 year ago

Another one, with more details about using the changesets cli: https://www.youtube.com/watch?v=vO80X5zM8_Y

wasadigi commented 1 year ago

See the origin of using changesets in Backstage: https://github.com/backstage/backstage/issues/1839

wasadigi commented 1 year ago

I have installed: https://github.com/apps/changeset-bot. Unfortunately, it does not work because our .changeset directory is not at the root of the repo. This is related to https://github.com/changesets/bot/issues/60.