-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Migrate project to sbt-projectmatrix #33
Conversation
|
||
ThisBuild / githubWorkflowBuildSbtStepPreamble := Seq.empty | ||
|
||
ThisBuild / githubWorkflowArtifactUpload := false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to disable uploading of artifacts as sbt-gha does not generate list of artifacts to upload based on the matrix values but it generates it for all modules and there is no builtin way to configure it to this use-case. It fails with directory does not exist in our case as jvm-2.13 is not present when building for scala 3. There a workaround mentioned in sbt/sbt-github-actions#9 but I think that it doesn't apply to our case.
Maybe this can be fixed by overriding githubWorkflowGeneratedUploadSteps
but readme discourages such actions.
// Add makeMicrosite to the build step | ||
ThisBuild / githubWorkflowBuild ~= { steps => | ||
steps.map { | ||
case w: WorkflowStep.Sbt if w.commands == List("test") => | ||
w.copy(commands = List("test", "makeMicrosite", "publishLocal")) | ||
w.copy(commands = | ||
List("test", "publishLocal").map(_ + "_${{ matrix.scala }}_${{ matrix.scalaPlatform }}") :+ "makeMicrosite", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makeMicrosite
will be run for every build matrix entry which is not ideal but I didn't find a way to make it conditional only for 2.13.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks no biggie we can fix that later.
It seems that |
Happy to switch to use https://typelevel.org/sbt-typelevel/gha.html it has some niceties OOTB👍 |
Migrate project to sbt-projectmatrix. This is a prerequisite for #32