ort icon indicating copy to clipboard operation
ort copied to clipboard

Create automation for ORT releases (incl. release notes)

Open sschuberth opened this issue 6 years ago • 9 comments

Currently, there are not fixed releases for ORT available, but only dynamically built artifacts via JitPack. While this works reasonably well for "early adopters" like SW360 Antenna, it would be nice to have "real" releases with semantic versioning.

While a common option is to publish JVM artifacts to Maven central or JCenter, another option for us is to use GitHub's built-in package registry. Publishing to GitHub can the nicely automated using GitHub actions.

As discussed internally earlier, the trigger for a release should be the push of a(n) (annotated) tag of a special name. Luckily, a ready-made GitHub action exists which seems to do exactly that. We should evaluate that action and eventually take it into use to prepare for automating releases in the near future.

sschuberth avatar Oct 23 '19 13:10 sschuberth

Creating an ORT release should involve running ORT on ORT in order to create a proper disclosure document, e.g. a NOTICE file, to be bundled with the distribution / Fat JAR for the CLI.

sschuberth avatar Feb 25 '20 20:02 sschuberth

Hi, Is there an official image available in Docker Hub?

gongzhao1 avatar Apr 20 '20 05:04 gongzhao1

No, not yet, see https://github.com/oss-review-toolkit/ort/issues/2441. You currently have to build the image yourself.

sschuberth avatar Apr 20 '20 07:04 sschuberth

FYI, I recently came across https://github.com/orhun/git-cliff to generate changelog files / release notes from the Git history, which might be interesting for us in this context.

sschuberth avatar Sep 09 '21 07:09 sschuberth

Maybe also https://github.com/jreleaser/jreleaser could become useful here.

sschuberth avatar Oct 01 '21 13:10 sschuberth

Hi there, I'm the author of JReleaser. The tool can certainly help you craft a changelog based on just commit information. If you're looking for an option to generate the changelog based on GH Issues/PRs then I'd recommend https://github.com/release-drafter/release-drafter

Of course JReleaser works both in local and CI environments.

One more thing, if you're interested in posting ready made binaries (such as CLI based tools) then JReleaser can also help you

  • posting those binaries to a GitHub release page
  • creating platform packagers for those binaries with Homebrew, Scoop, others.

aalmiray avatar Oct 01 '21 19:10 aalmiray

Probably also relevant for us is GitHub's new feature to automatically generate release notes for GitHub releases.

sschuberth avatar Oct 04 '21 19:10 sschuberth

Publishing to the new Adoptium Marketplace could also be an option.

sschuberth avatar May 30 '22 06:05 sschuberth

https://github.com/semantic-release/semantic-release <= a fine tool we're using.

Integrates with github actions as well: https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/ci-configurations/github-actions.md

mawl avatar Jul 14 '22 10:07 mawl

Idea from @mnonnenmacher at the ORT Community Day: Attach release notes to annotate Git tags to be independent of GitHub.

sschuberth avatar Mar 16 '23 10:03 sschuberth

After reading through @pombredanne's https://www.nexb.com/software-versioning/, I wonder whether we could use a mix of CalVer and ideas from SemVer for ORT. The version number "prefix" would be CalVer (for sorting), plus a "suffix" that contains the number of breaking changes, new features, and bugfixes, respectively. The latter numbers could be calculated from our Conventional Commits easily, and in contrast to "pure" SemVer these numbers also give you a clue about how much (not only that) something has changed.

So, for example an initial ORT release from today would have version 2023.7.19+0.0.0 as relative to the previous release (there is none) no changes can be computed. The next release on the last day of next month with 3 breaking changes, 1 new feature, and 5 bug fixes would have version number 2023.8.31+3.1.5. When omitting leading 0 in the date, the whole string is SemVer compliant, and using + instead of - nicely resembles that the following "build metadata" describes what has been added.

sschuberth avatar Jul 19 '23 13:07 sschuberth

this might align better with expectations coming from semver if you reverse the order: 3.1.5+2023.8.31. Should still have the same properties.

maxhbr avatar Jul 19 '23 13:07 maxhbr

3.1.5+2023.8.31. Should still have the same properties.

That breaks (string) sorting (by date).

Edit: But I just realized omitting leading 0s does, too 😭

sschuberth avatar Jul 19 '23 13:07 sschuberth

if the leading version is just increased and every increased version is released at a later date, the sorting should still be the same. (If not just string sorting, but semantically sorting the parts)

maxhbr avatar Jul 19 '23 13:07 maxhbr

if the leading version is just increased

The idea was not to monotonically increase the numbers, but to be relative to the previous release.

sschuberth avatar Jul 19 '23 13:07 sschuberth

oh, sorry, I missed the relative.

maxhbr avatar Jul 19 '23 13:07 maxhbr

As discussed in today's community meeting, we'll like stick to plain SemVer after all, mostly for for simplicity as remembering the date as part of a version (if you want to upgrade) is hard.

sschuberth avatar Jul 20 '23 08:07 sschuberth

This is now done (using https://github.com/jmongard/Git.SemVersioning.Gradle).

sschuberth avatar Sep 21 '23 10:09 sschuberth