File tree Expand file tree Collapse file tree 5 files changed +63
-4
lines changed
Expand file tree Collapse file tree 5 files changed +63
-4
lines changed Original file line number Diff line number Diff line change 1+ getProp (){
2+ grep " ${1} " gradle.properties | cut -d' =' -f2 | sed ' s/\r//'
3+ }
4+ publishVersion=$( getProp VERSION_NAME)
5+ snapshotSuffix=' SNAPSHOT'
6+
7+ chmod +x ./gradlew
8+ ./gradlew publishAllPublicationsToMavenCentral
9+ if [[ " $publishVersion " != * " $snapshotSuffix " * ]]; then
10+ echo " auto release artifacts of ${publishVersion} "
11+ ./gradlew closeAndReleaseRepository
12+ fi
Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ # Allows you to run this workflow manually from the Actions tab
9+ workflow_dispatch :
10+
11+ jobs :
12+ publish :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Check out
16+ uses : actions/checkout@v2
17+
18+ - name : Set up JDK 8
19+ uses : actions/setup-java@v2
20+ with :
21+ distribution : ' zulu'
22+ java-version : ' 8'
23+
24+ - name : Build & Publish to Maven Central
25+ run : chmod +x .github/scripts/publish.sh && .github/scripts/publish.sh
26+ env :
27+ ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
28+ ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
29+ ORG_GRADLE_PROJECT_signingInMemoryKey : ${{ secrets.SIGNING_IN_MEMORY_KEY }}
30+ ORG_GRADLE_PROJECT_signingInMemoryKeyId : ${{ secrets.SIGNING_IN_MEMORY_KEY_ID }}
31+ ORG_GRADLE_PROJECT_signingInMemoryKeyPassword : ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ release-on-push :
10+ runs-on : ubuntu-latest
11+ env :
12+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
13+ steps :
14+ - uses : rymndhng/release-on-push-action@master
15+ with :
16+ bump_version_scheme : norelease
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ It is really useful when you use Kotlin String template as a template to render
102102```
103103plugins {
104104 ...
105- id("com.bennyhuo.kotlin.trimindent") version "1.8.0.0 "
105+ id("com.bennyhuo.kotlin.trimindent") version "1.8.0"
106106}
107107```
108108
@@ -118,13 +118,13 @@ buildscript {
118118
119119plugins {
120120 ...
121- id("com.bennyhuo.kotlin.trimindent") version "1.8.0. 1-SNAPSHOT"
121+ id("com.bennyhuo.kotlin.trimindent") version "1.8.1-SNAPSHOT"
122122}
123123```
124124
125125## Change Log
126126
127- ### 1.8.0.0
127+ ### 1.8.0
128128
129129* Upgrade Kotlin to 1.8.0.
130130
Original file line number Diff line number Diff line change 11kotlin.code.style =official
22
3- VERSION_NAME =1.8.0.0
3+ VERSION_NAME =1.8.0
44
55GROUP =com.bennyhuo.kotlin
66
You can’t perform that action at this time.
0 commit comments