v3.8.0
3.8.0 - 2026-08-23
New Features
-
Generate release note / changelog from commit messages (#306) - Add
devOopsReleaseFromTagto release from an existing Git tag with GitHub's generated release notesdevOopsReleaseFromTagis a new sbt input task that releases from an existing Git tag using GitHub's own generate release notes feature. It takes exactly one tag name and fails when the tag name is missing or more than one is given.devOopsReleaseFromTag <tag-name>e.g.)
sbt 'devOopsReleaseFromTag v1.2.3'Unlike the other release tasks, it does not use the project version, does not read any changelog file (
devOopsChangelogLocation) and does not followdevOopsWhenGitHubReleaseExistsInRelease. The release note is whatever GitHub generates.It does
-
Check that the tag exists locally (
git fetch --tagsthengit tag). If not, the task fails. -
Check that the tag exists on the GitHub repository. If not, the task fails.
This check matters. When the tag does not exist on GitHub, GitHub's create release API creates a new tag on the default branch instead of failing, so a tag that has not been pushed yet would be released from the wrong commit.
-
If there is no GitHub release for the tag, create one with the generated release notes. GitHub also generates the release name.
-
If the GitHub release for the tag already exists, generate the release notes and append them to the existing release note after a
***separator.EXISTING RELEASE NOTE *** GENERATED RELEASE NOTEIf the existing release note is empty, the generated release notes become the whole release note without the separator.
-
If the existing release note already contains the generated release notes, nothing is updated so that the same release notes are not appended twice. It is safe to run
devOopsReleaseFromTagmore than once for the same tag.
The outcome is reported as
ReleaseResult(available viaautoImport), which is one ofReleaseResultMeaning ReleasedWithGeneratedReleaseNoteThere was no release for the tag, so it was created with the generated release notes. GeneratedReleaseNoteAppendedThe release already existed, and the generated release notes were appended. IgnoredDuplicateReleaseNoteThe generated release notes were already in the release note, so nothing changed. In a GitHub Actions workflow triggered by a tag push,
${{ github.ref_name }}is the tag name, so it can run right afterdevOopsGitHubReleaseto append the generated release notes to the release note from the changelog.- name: sbt Append Generated Release Notes env: GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} run: | sbt -J-Xmx2048m \ ++${{ matrix.scala.version }}! \ "devOopsReleaseFromTag ${{ github.ref_name }}"
For more details, see devOopsReleaseFromTag.
-
Changes
-
Decode GitHub's nullable release fields as
Option(#531)GitHubRelease.ResponseandGitHubRelease.Assetdecoded four fields as required although GitHub's schema declares them nullable, so an explicitnullin any of them would fail decoding and take downfindReleaseByTagName, which is on the path ofdevOopsReleaseFromTag,devOopsGitHubReleaseanddevOopsGitHubReleaseUploadArtifactsalike.Field Documented type Before After release.namestring or null ReleaseNameOption[ReleaseName]release.bodystring or null DescriptionOption[Description]asset.labelstring or null Asset.LabelOption[Asset.Label]asset.uploadernull or Simple User GitHub.UserOption[GitHub.User]This is conformance hardening rather than a fix for a live bug. GitHub currently returns
""rather thannullfor an absent release name, body or asset label, and empty values already decoded correctly. The point is to accept everything the documented schema permits, including what GitHub Enterprise Server may send and any future change to the API output.
What's Changed
- Update docs - update version info by @kevin-lee in #528
- Bump actions/setup-node from 6 to 7 by @dependabot[bot] in #529
- Close #306: Add
devOopsReleaseFromTagto release from an existing Git tag with GitHub's generated release notes by @kevin-lee in #530 - Decode GitHub's nullable release fields as
Optionby @kevin-lee in #531 - Document devOopsReleaseFromTag and its GitHub Actions usage by @kevin-lee in #532
- sbt-devoops v3.8.0 by @kevin-lee in #533
Full Changelog: v3.7.0...v3.8.0