gatsby-typescript
gatsby-typescript copied to clipboard
Auto publish starters via Github Actions
Per our discussions in #41 and #42 , I think it makes sense to run a gatsby build
as a required status check before merging a PR.
Here's my idea:
Since you already have the gatsby-starter-blog-ts
package in there, let's create a GitHub Workflow that will link the packages via lerna and then simply run gatsby build
and see if it succeeds. This is kind of nice because you get the confidence that the plugins are working as well as gatsby-starter-blog-ts
.
Let me know what you think. I can experiment in my fork if I get your blessing.
That's a great idea!! Would it make sense to add a new gatsby package for each scenario we want to test? i.e codebase with mixed ts/js, codebase with apollo client (#39), codebase with gatsby-node.ts etc.
Also, I am very impressed with the professionalism shown in the way you communicate & your code — would you accept to be a collaborator to this project? It'll be easier to work on the tests and also #39
Would it make sense to add a new gatsby package for each scenario we want to test?
I think so, creating a publishable starter for each scenario (and put each starting in /packages
) seems like the right thing to do but it also sounds like a lot of work to maintain if the number of scenarios or number of features in a scenario grows too much.
So given that, I think it makes sense to add (and potentially publish) one simple and bare-bones package to this repo for now: packages/gatsby-starter-ts
(this name is also available on npm and it's on-brand with gatsby-plugin-ts
!)
It will be a modified version of gatsby-starter-default
that will include gatsby-plugin-ts
. This package will have two purposes:
- be an actual starter that people can use
- be part of our CI where it building successfully is a required status check before merging PRs etc
This + the tests we added in #42 should give us pretty significant coverage. We could even add tools like dependabot that will automatically open PRs for upgrades to packages. If we run our tests and run our builds, we should have no problem merging in dependabot PRs.
In respect to #39 , like you suggested, I think it makes sense to create another starter that includes working with the apollo client and codegen but that effort can come after we create gatsby-starter-ts
.
Agreed, I also found this helpful article to publish starter from within a workspace with github actions: https://johno.com/publishing-gatsby-starters-from-monorepo