diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d19ab7d2..14455836d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,10 +4,18 @@ jobs: build: runs-on: ubuntu-20.04 container: - image: openjdk:16-jdk + image: adoptopenjdk:16-jdk options: --user root steps: - - uses: actions/checkout@v1 + - run: apt update && apt install git -y && git --version + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: FabricMC/fabric-action-scripts@v1 + id: changelog + with: + context: changelog + workflow_id: release.yml - uses: gradle/wrapper-validation-action@v1 - run: ./gradlew checkVersion build publish curseforge github modrinth --stacktrace env: @@ -17,3 +25,4 @@ jobs: CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }} GITHUB_TOKEN: ${{ secrets.GH_API_KEY }} MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + CHANGELOG: ${{ steps.changelog.outputs.changelog }} diff --git a/build.gradle b/build.gradle index 1778a7a31..da59b614f 100644 --- a/build.gradle +++ b/build.gradle @@ -345,7 +345,7 @@ curseforge { project { id = "306612" - changelog = "A changelog can be found at https://github.com/FabricMC/fabric/commits" + changelog = ENV.CHANGELOG ?: "No changelog provided" releaseType = Globals.preRelease ? "beta" : "release" addGameVersion "1.17.1" addGameVersion "Fabric" @@ -378,7 +378,7 @@ task github(dependsOn: remapMavenJar) { def releaseBuilder = new GHReleaseBuilder(repository, version as String) releaseBuilder.name("[$Globals.mcVersion] Fabric API $Globals.baseVersion") - releaseBuilder.body("A changelog can be found at https://github.com/FabricMC/fabric/commits") + releaseBuilder.body(ENV.CHANGELOG ?: "No changelog provided") releaseBuilder.commitish(getBranch()) releaseBuilder.prerelease(Globals.preRelease) @@ -397,6 +397,7 @@ task modrinth(type: com.modrinth.minotaur.TaskModrinthUpload, dependsOn: remapMa versionNumber = version versionName = "[$Globals.mcVersion] Fabric API $Globals.baseVersion" releaseType = Globals.preRelease ? "beta" : "release" + changelog = ENV.CHANGELOG ?: "No changelog provided" uploadFile = file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")