Skip to content

Commit 48bca16

Browse files
authored
Merge pull request #369 from wuseal/add-change-log-to-github-release
Add change log to GitHub release
2 parents 895aa44 + b479a6a commit 48bca16

File tree

4 files changed

+32
-14
lines changed

4 files changed

+32
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ local.properties
77

88
build/
99
out/
10+
/githubReleaseNote.md

.travis.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,39 @@ script:
99
- ./gradlew buildPlugin
1010
- cd library && ./gradlew build test -s
1111
- cd ../
12+
- ./gradlew createGithubReleaseNotes
1213
deploy:
1314
- provider: releases
1415
api_key: $GH_TOKEN
1516
file_glob: true
1617
file: build/distributions/JsonToKotlinClass*.zip
18+
edge: true
1719
skip_cleanup: true
20+
prerelease: true
21+
release_notes_file: "./githubReleaseNote.md"
1822
on:
1923
tags: true
2024
repo: wuseal/JsonToKotlinClass
21-
- provider: script
22-
script: "./gradlew publishPlugin -Dchannels=eap"
25+
condition: "$TRAVIS_TAG =~ (eap|EAP)"
26+
- provider: releases
27+
api_key: $GH_TOKEN
28+
file_glob: true
29+
file: build/distributions/JsonToKotlinClass*.zip
30+
edge: true
2331
skip_cleanup: true
32+
prerelease: false
33+
release_notes_file: "./githubReleaseNote.md"
2434
on:
2535
tags: true
2636
repo: wuseal/JsonToKotlinClass
27-
condition: "$TRAVIS_TAG =~ (eap|EAP)"
37+
condition: "$TRAVIS_TAG =~ ^[0-9]+\\.[0-9]+\\.[0-9]+$"
2838
- provider: script
29-
script: "./gradlew publishPlugin -Dchannels=alpha"
39+
script: "./gradlew publishPlugin -Dchannels=eap"
3040
skip_cleanup: true
3141
on:
3242
tags: true
3343
repo: wuseal/JsonToKotlinClass
34-
condition: "$TRAVIS_TAG =~ (alpha|Alpha)"
44+
condition: "$TRAVIS_TAG =~ (eap|EAP)"
3545
- provider: script
3646
script: "./gradlew publishPlugin"
3747
skip_cleanup: true

build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,12 @@ changelog {
8484

8585
outputFile = file("${projectDir}/doc/CHANGELOG.md")
8686
}
87+
88+
task("createGithubReleaseNotes") {
89+
doLast {
90+
val githubReleaseNoteFile = file("./githubReleaseNote.md")
91+
val content ="**" + file("${projectDir}/doc/CHANGELOG.md").readText()
92+
.substringAfter("**").substringBefore("##").trim()
93+
githubReleaseNoteFile.writeText(content)
94+
}
95+
}

doc/CHANGELOG.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
# Change Log
22

3-
## [3.7.2\-EAP\-4](https://github.com/wuseal/JsonToKotlinClass/tree/3.7.2-EAP-4) (2021-07-17)
4-
[View commits](https://github.com/wuseal/JsonToKotlinClass/compare/3.7.2-EAP-2...3.7.2-EAP-4)
5-
6-
**Features**
7-
8-
- Support adding \`Expose\` Annotation for Gson by new Extension [\#366](https://github.com/wuseal/JsonToKotlinClass/pull/366) ([@wuseal](https://github.com/wuseal))
9-
10-
## [3.7.2\-EAP\-2](https://github.com/wuseal/JsonToKotlinClass/tree/3.7.2-EAP-2) (2021-07-06)
11-
[View commits](https://github.com/wuseal/JsonToKotlinClass/compare/3.7.1...3.7.2-EAP-2)
3+
## [3.7.2\-EAP\-10](https://github.com/wuseal/JsonToKotlinClass/tree/3.7.2-EAP-10) (2021-07-25)
4+
[View commits](https://github.com/wuseal/JsonToKotlinClass/compare/3.7.1...3.7.2-EAP-10)
125

136
**Bugfix**
147

8+
- 🐛 fix JsonSchema type error when refer to non\-object definitions [\#368](https://github.com/wuseal/JsonToKotlinClass/pull/368) ([@TedZen](https://github.com/TedZen))
159
- Exception in JsonToKotlin 3.6.1 \- AGP 4.1.2 [\#320](https://github.com/wuseal/JsonToKotlinClass/issues/320)
1610

1711
**Enhancement**
1812

1913
- Update icon and project title picture for JsonToKotlinClass [\#363](https://github.com/wuseal/JsonToKotlinClass/issues/363)
2014

15+
**Features**
16+
17+
- Support adding \`Expose\` Annotation for Gson by new Extension [\#366](https://github.com/wuseal/JsonToKotlinClass/pull/366) ([@wuseal](https://github.com/wuseal))
18+
2119
## [3.7.1](https://github.com/wuseal/JsonToKotlinClass/tree/3.7.1) (2021-06-30)
2220
[View commits](https://github.com/wuseal/JsonToKotlinClass/compare/3.7.0...3.7.1)
2321

0 commit comments

Comments
 (0)