-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update build and include sbt publish GHA workflow #193
Conversation
|
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.
🎉
build.sbt
Outdated
@@ -19,21 +22,12 @@ inThisBuild(Seq( | |||
scalacOptions ++= Seq( | |||
"-deprecation", | |||
"-Xfatal-warnings", | |||
"-encoding", "UTF-8" | |||
"-encoding", "UTF-8", | |||
"-release:11", | |||
), | |||
// sonatype metadata | |||
organization := "com.gu", | |||
licenses := Seq("Apache V2" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")), |
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.
This can be tweaked to:
licenses := Seq("Apache V2" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")), | |
licenses := Seq(License.Apache2), |
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.
Yeah thanks, might as well update that now as well 👍
@@ -0,0 +1,13 @@ | |||
name: Release Scala client |
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.
Just by convention, this file is called release.yml
in all the other repos that have gha-scala-library-release-workflow
- would it be ok to rename this file to match?
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.
The trouble is that this repo has a node client and a Scala client. I didn't want the workflow to give the impression it would do both. Let me know if you feel super strongly, but I don't think hogging the word "release" in the workflow namespace is always a good idea!
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.
That makes sense - what we've actually done with other libraries that publish both NPM & Scala packages is that we've tied them together in a single release workflow (at which point, it's kind of ok to just call it release.yml
again). We allow the NPM release to utilise the Scala libraries version number, so that their releases are synchronised and it's easy to see whether the NPM and Scala libraries are from the same point in time.
We've done this for:
- Adopt GHA-Scala-Library-Release-Workflow content-api-models#232
- Adopt gha-scala-library-release process content-entity#32
- Adopt gha-scala-rel-workflow in the project content-atom#166
These libraries where largely completely defined by their thrift definitions, so if one library wanted to change, the other did too. This might not be the case with anghammarad
, so it might not apply here, but it is quite nice to just have one button to press.
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.
Ok makes sense! I'll rename it and we can consider unifying these libraries in the future.
Sets up Anghammarad to use the sbt publish GHA workflow, removing redundant publishing plugins for sbt and eliminating sbt config options that are no longer required. We also include the workflow file itself, taken from the docs. https://github.com/guardian/gha-scala-library-release-workflow/blob/main/docs/configuration.md
7be0261
to
e97c536
Compare
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.
We should update the README about releasing the Scala client as well. I also agree that weaving the NPM release into the release workflow as suggested by Roberto would be a good idea, if appropriate. Both can be done as separate PRs though.
This repository contains an npm client library as well as the scala client. Despite this, we're best off creating a single "release" workflow and if we want to automate the npm flow we can have it be called from this single release workflow.
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.
👍
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.
Looks good! One small tweak to the readme that you can have if you like.
Improve the documentation of the release workflow Co-authored-by: Roberto Tyley <roberto.tyley@gmail.com>
What does this change?
Sets up Anghammarad to use the sbt publish GHA workflow, removing redundant publishing plugins for sbt and eliminating sbt config options that are no longer required.
We also include the workflow file itself, taken from the docs.
https://github.com/guardian/gha-scala-library-release-workflow/blob/main/docs/configuration.md
How to test
We'll hit the "release" button once this (and dependent infrastructure*) is merged.