File tree Expand file tree Collapse file tree 5 files changed +30
-14
lines changed Expand file tree Collapse file tree 5 files changed +30
-14
lines changed Original file line number Diff line number Diff line change 3535 uses : actions/setup-java@v1
3636 with :
3737 java-version : ${{ matrix.jdk }}
38- - run : chmod +x gradlew
3938 - run : ./gradlew build --stacktrace --warning-mode all
4039
4140 release :
4544 if : github.event_name == 'push'
4645 && github.ref == 'refs/heads/main'
4746 && github.repository == 'MinimallyCorrect/JavaTransformer'
47+ && !contains(toJSON(github.event.commits.*.message), '[skip ci]')
4848 && !contains(toJSON(github.event.commits.*.message), '[skip release]')
4949
5050 steps :
5959 java-version : 11
6060
6161 - name : Build and publish to github
62- run : ./gradlew -P releasing publish publishPlugins githubRelease -s
62+ run : ./gradlew -P releasing build publish githubRelease -s
6363 env :
6464 GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
65- GRADLE_PUBLISH_KEY : ${{secrets.GRADLE_PUBLISH_KEY}}
66- GRADLE_PUBLISH_SECRET : ${{secrets.GRADLE_PUBLISH_SECRET}}
6765 DEPLOYMENT_REPO_URL_RELEASE : ${{secrets.DEPLOYMENT_REPO_URL_RELEASE}}
6866 DEPLOYMENT_REPO_URL_SNAPSHOT : ${{secrets.DEPLOYMENT_REPO_URL_SNAPSHOT}}
6967 DEPLOYMENT_REPO_USERNAME : ${{secrets.DEPLOYMENT_REPO_USERNAME}}
Original file line number Diff line number Diff line change 11plugins {
2+ id(" base" )
23 id(" java" )
34 id(" java-library" )
45 id(" maven-publish" )
5- id(" dev.minco.gradle.defaults-plugin" ) version " 0.2.4"
6+ id(" dev.minco.gradle.defaults-plugin" ) version " 0.2.8"
7+ id(" org.shipkit.shipkit-auto-version" ) version " 1.1.1"
8+ id(" org.shipkit.shipkit-changelog" ) version " 1.1.4"
9+ id(" org.shipkit.shipkit-github-release" ) version " 1.1.4"
610}
711
812apply (from = " properties.gradle" )
13+ apply (from = " $rootDir /gradle/shipkit.gradle" )
14+
15+ val releasing = project.hasProperty(" releasing" )
16+ if (! releasing) {
17+ version = " $version -SNAPSHOT"
18+ }
919
1020repositories {
1121 exclusiveContent {
@@ -21,9 +31,8 @@ repositories {
2131 mavenCentral()
2232}
2333
24- minimallyCorrectDefaults {
25- configureProject(project)
26- }
34+ minimallyCorrectDefaults.languageLevel = JavaVersion .VERSION_11
35+ minimallyCorrectDefaults.configureProject(project)
2736
2837dependencies {
2938 testImplementation(" junit:junit:4.13.2" )
Original file line number Diff line number Diff line change 1- // Auto-generated by https://github.com/MinimallyCorrect/DefaultsPlugin
1+ tasks. named(" mincoGenerateChangelog" ) {
2+ version. value(" " + project. version)
3+ githubUrl. value(project. ext[" githubUrl" ] as String )
4+ outputFile. fileValue(project. file(" $buildDir /changelog.md" ))
5+ fromRevision. value(project. ext[" shipkit-auto-version.previous-tag" ] as String )
6+ }
27
3- minimallyCorrectDefaultsShipkit {} ()
8+ tasks. named(" githubRelease" ) {
9+ def genTask = tasks. named(" mincoGenerateChangelog" ). get()
10+ dependsOn(genTask)
11+ repository = project. ext[" githubOwnerProject" ] as String
12+ changelog = genTask. outputFile. get(). getAsFile()
13+ newTagRevision = System . getenv(" GITHUB_SHA" )
14+ githubToken = System . getenv(" GITHUB_TOKEN" )
15+ }
Original file line number Diff line number Diff line change @@ -10,6 +10,3 @@ ext.githubOwnerProject = "${ext.githubOwner}/${ext.githubProject}".toString()
1010ext. githubUrl = " https://github.com/${ ext.githubOwnerProject} " . toString()
1111ext. website = ext. githubUrl
1212ext. vcsUrl = " ${ ext.githubUrl} .git" . toString()
13-
14- System . setProperty(" gradle.publish.key" , System . getenv(" GRADLE_PUBLISH_KEY" ) ?: " " )
15- System . setProperty(" gradle.publish.secret" , System . getenv(" GRADLE_PUBLISH_SECRET" ) ?: " " )
Original file line number Diff line number Diff line change 11# Version of the produced binaries. This file is intended to be checked-in.
22# It will be automatically bumped by release automation.
3- version =1.9.x
3+ version =1.9.*
You can’t perform that action at this time.
0 commit comments