Skip to content

Commit 76a8b76

Browse files
committed
Use the new spotless-changelog to create GitHub releases.
1 parent 30b9737 commit 76a8b76

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ jobs:
4343
uses: gradle/gradle-build-action@v3
4444
with:
4545
gradle-home-cache-cleanup: true
46-
- name: git fetch origin main
47-
run: git fetch origin main
46+
- run: git fetch origin main
4847
- name: publish all
4948
if: "${{ github.event.inputs.to_publish == 'all' }}"
5049
run: |
5150
./gradlew :changelogPush -Prelease=true -Penable_publishing=true -Pgradle.publish.key=${{ secrets.GRADLE_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_SECRET }} --stacktrace --warning-mode all
51+
- run: git checkout main
52+
- run: git merge release
53+
- run: git push origin main

build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ plugins {
33
id 'com.diffplug.spotless-changelog'
44
}
55

6+
spotlessChangelog {
7+
tagMessage '{{changes}}'
8+
runAfterPush "gh release create release/{{version}} --title 'v{{version}}' --notes-from-tag"
9+
}
10+
611
repositories { mavenCentral() }
712

813
group =.proj('maven_group', 'the maven group, recommend com.diffplug')

settings.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ plugins {
1010
// https://github.com/diffplug/spotless/blob/main/plugin-gradle/CHANGES.md
1111
id 'com.diffplug.spotless' version '7.0.0.BETA1' apply false
1212
// https://github.com/diffplug/spotless-changelog/blob/main/CHANGELOG.md
13-
id 'com.diffplug.spotless-changelog' version '3.0.2' apply false
13+
id 'com.diffplug.spotless-changelog' version '3.1.1' apply false
1414
// https://plugins.gradle.org/plugin/com.gradle.plugin-publish
1515
id 'com.gradle.plugin-publish' version '1.2.1' apply false
1616
// https://github.com/equodev/equo-ide/blob/main/plugin-gradle/CHANGELOG.md
@@ -35,6 +35,7 @@ blowdryerSetup {
3535
setPluginsBlockTo {
3636
it.file 'plugin.versions'
3737
it.file 'plugin-kotlin.versions'
38+
it.replace '3.0.2', '3.1.1'
3839
}
3940
}
4041

0 commit comments

Comments
 (0)