Skip to content

Commit

Permalink
update gradle actions task and add outputChangelog task
Browse files Browse the repository at this point in the history
  • Loading branch information
thiakil committed Jul 10, 2023
1 parent b0f9c22 commit d916f24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ jobs:
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
cache: 'gradle'

- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
uses: gradle/gradle-build-action@v2
with:
arguments: clean build
arguments: clean build outputChangelog
gradle-version: wrapper

- name: Upload to workflow artifacts
Expand All @@ -47,7 +46,7 @@ jobs:
path: build/libs/

# - name: Publish
# uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
# uses: gradle/gradle-build-action@v2
# with:
# arguments: curseforge modrinth publish
# gradle-version: wrapper
Expand Down
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,12 @@ def changeLogResolver = { ->
return generatedChangelog
}

tasks.register('outputChangelog') {
doLast {
project.file("build/changelog.html").text = changeLogResolver.call()
}
}

if (System.getenv("CURSEFORGE_KEY") != null || project.hasProperty('curseforgeKey')) {
println "Enabling Curseforge config"
tasks.register("curseforge", TaskPublishCurseForge, { task ->
Expand Down

0 comments on commit d916f24

Please sign in to comment.