From 851a7f91b7166d8d74f96c4fcca82bfdea0f676c Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Mon, 26 Dec 2022 09:12:37 +0100 Subject: [PATCH 1/2] refactor(ci): change the way releases are automated A lot of users will get Steward PRs that automatically link to the release page of that release. For example with the last release here this linked to https://github.com/com-lihaoyi/requests-scala/releases/tag/0.8.0. The thing is, this page is empty and doesn't tell the user anything. I know it's common in the com-lihaoyi ecosystem to include the changelog in the readme, so maybe we can also automate the release better. This pr changes a couple things: - Changes the actual github action in control of the release. The one we were using before (https://github.com/actions/create-release) is archived and no longer maintained. This switches to a new one that from what I can tell is the most popular (https://github.com/softprops/action-gh-release). - Use the `generate_release_notes` option which will automate generating the release notes by just putting all the commits for this release in there. - Use `append_body` to also then link to the changelog in the readme. This should be a nicer experience for those clicking the link with Steward without changing the way you currently manually do your changelog. --- .github/workflows/actions.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 1554bfc..620fc12 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -73,11 +73,7 @@ jobs: fi - name: Create GitHub Release id: create_gh_release - uses: actions/create-release@v1.1.4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - body: - draft: false + generate_release_notes: true + append_body: https://github.com/com-lihaoyi/requests-scala#changelog From 85b905791cd15a130655eb883c41851864162c8a Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Thu, 5 Jan 2023 20:45:27 +0100 Subject: [PATCH 2/2] chore: add in info.releaseNotesURL --- build.sc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.sc b/build.sc index 3ad7082..1357045 100644 --- a/build.sc +++ b/build.sc @@ -13,6 +13,9 @@ val scalaVersions = List("2.12.17", "2.13.10", "2.11.12", "3.1.1") ++ dottyVersi object requests extends Cross[RequestsModule](scalaVersions: _*) class RequestsModule(val crossScalaVersion: String) extends CrossScalaModule with PublishModule with Mima { def publishVersion = VcsVersion.vcsState().format() + def publishProperties = super.publishProperties() ++ Map( + "info.releaseNotesURL" -> "https://github.com/com-lihaoyi/requests-scala#changelog" + ) def mimaPreviousVersions = (Seq("0.7.0", "0.7.1") ++ VcsVersion.vcsState().lastTag.toSeq).distinct override def mimaBinaryIssueFilters = Seq( ProblemFilter.exclude[ReversedMissingMethodProblem]("requests.BaseSession.send"),