Skip to content

v3.8.0

Choose a tag to compare

@kevin-lee kevin-lee released this 22 Aug 16:40
· 13 commits to main since this release
v3.8.0

3.8.0 - 2026-08-23

New Features

  • Generate release note / changelog from commit messages (#306) - Add devOopsReleaseFromTag to release from an existing Git tag with GitHub's generated release notes

    devOopsReleaseFromTag is 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 follow devOopsWhenGitHubReleaseExistsInRelease. The release note is whatever GitHub generates.

    It does

    • Check that the tag exists locally (git fetch --tags then git 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 NOTE
      

      If 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 devOopsReleaseFromTag more than once for the same tag.

    The outcome is reported as ReleaseResult (available via autoImport), which is one of

    ReleaseResult Meaning
    ReleasedWithGeneratedReleaseNote There was no release for the tag, so it was created with the generated release notes.
    GeneratedReleaseNoteAppended The release already existed, and the generated release notes were appended.
    IgnoredDuplicateReleaseNote The 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 after devOopsGitHubRelease to 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.Response and GitHubRelease.Asset decoded four fields as required although GitHub's schema declares them nullable, so an explicit null in any of them would fail decoding and take down findReleaseByTagName, which is on the path of devOopsReleaseFromTag, devOopsGitHubRelease and devOopsGitHubReleaseUploadArtifacts alike.

    Field Documented type Before After
    release.name string or null ReleaseName Option[ReleaseName]
    release.body string or null Description Option[Description]
    asset.label string or null Asset.Label Option[Asset.Label]
    asset.uploader null or Simple User GitHub.User Option[GitHub.User]

    This is conformance hardening rather than a fix for a live bug. GitHub currently returns "" rather than null for 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 devOopsReleaseFromTag to release from an existing Git tag with GitHub's generated release notes by @kevin-lee in #530
  • Decode GitHub's nullable release fields as Option by @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