-
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
Adopt gha-scala-library-release process #32
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.
Thanks for adding CI in 92edec6 - note that you also can delete .travis.yml
, as that's the legacy of an obsolete CI system!
build.sbt
Outdated
.settings(commonSettings) | ||
.settings(npmBetaReleaseTagMaybe) | ||
.settings(artifactProductionSettings) | ||
.settings(npmBetaReleaseTagMaybe)//do we need to remove this? |
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.
Yep, we need to remove npmBetaReleaseTagMaybe
, along with betaReleaseType
& betaReleaseSuffix
, etc!
.github/workflows/release.yml
Outdated
registry-url: https://registry.npmjs.org | ||
- name: Release Typescript to NPM | ||
run: | | ||
sbt "project typescript" "releaseNpm ${{ needs.scala-maven-release.outputs.RELEASE_VERSION }}" |
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 think the typescript
project is called typescriptClasses
in this project, for some reason!
Line 164 in aa49c1f
lazy val typescriptClasses = (project in file("ts")) |
build.sbt
Outdated
packageDoc / publishArtifact := false, //do we need to remove this? also because if root is using "publish / skip := true" instead? | ||
packageSrc / publishArtifact := false, //do we need to remove this? also because if root is using "publish / skip := true" instead? |
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.
Interesting - it looks like we've never published the thrift
project as an artifact, so actually it would be right to put publish / skip := true
on this submodule too!
build.sbt
Outdated
// scrooge 21.3.0: Builds are now only supported for Scala 2.12+ | ||
// https://twitter.github.io/scrooge/changelog.html#id11 | ||
crossScalaVersions := Seq("2.12.11", scalaVersion.value), | ||
crossScalaVersions := Seq("2.12.18", scalaVersion.value), | ||
releaseCrossBuild := true, |
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 line needs to be moved down into the root
project!
releaseCrossBuild := true, |
releaseCrossBuild
lives with releaseVersion
and releaseProcess
on the root-level aggregating project, not on the artifact-producing modules!
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.
good spot, I will correct it now 👍
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 think this all looks good to me, apart from the fact that your tidying-up has now revealed that releaseCrossBuild := true
was in the wrong place - once you've moved that I think this should be good to go!
Thanks @rtyley for your help in implementing the release process across all coPip's libraries (this being the last one). Will merge this PR to proceed for release testing 👍 |
Wonderful stuff! Don't forget to kick off a release! https://github.com/guardian/content-entity/actions/workflows/release.yml |
In this PR #32, we specified node-version-file in release.yml file to use .nvmrc file but we didn't add the file and hence got failed on NPM release. ref: https://github.com/guardian/content-entity/actions/runs/8360348474
packageDoc / publishArtifact := false, | ||
packageSrc / publishArtifact := false, | ||
publish / skip := true, |
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.
Ah whoops, I see what happened here! Yep, we didn't want to add publish / skip := true
here, because we do want an artifact. I think we probably want the original configuration (packageDoc / publishArtifact := false
& packageSrc / publishArtifact := false
) to stay as it is - they are only blocking the publishing of src & doc, not attempting to stop all artifacts for this module altogetherm as publishArtifact := false
would have been.
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.
Thank you @rtyley for confirming, yeah I didn't realise I restricted its publish.
I will revert to old changes on this section now 👍
We have encountered an issue of content-entity-thrift not being released after the work in PR #32 to maven due to error in making its publish to false which is corrected in the PR here #36 To test this we are trying manually version update to the one after which content-entity-thrift didn't get release.
This release is verified and tested. |
What does this change?
gha-scala-library-release-workflow
provides these benefits:gha-scala-library-release-workflow
automatically provides sensible defaults)NoSuchMethodError
) facia-scala-client#301 !) - and so block those problems at build time.Changes made according to Configuration section https://github.com/guardian/gha-scala-library-release-workflow/blob/main/docs/configuration.md
How to test
This PR in progress, need to verify sbt file with @rtyley and verify tests.
If all fine then we can try make preview release and test in some of clients using
content-entity-model
How can we measure success?
should be able to make release for this library very easily,