Skip to content

Commit 34561d8

Browse files
style: tidy up the GH actions
1 parent b407057 commit 34561d8

File tree

5 files changed

+16
-28
lines changed

5 files changed

+16
-28
lines changed

.github/workflows/gradle.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
51
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
62
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
73

8-
name: Java CI with Gradle
4+
name: Gradle CI
95

106
on:
117
push:
@@ -17,7 +13,7 @@ permissions:
1713
contents: read
1814

1915
jobs:
20-
build:
16+
check:
2117

2218
runs-on: ubuntu-latest
2319

@@ -31,10 +27,9 @@ jobs:
3127
java-version: '11'
3228
distribution: 'temurin'
3329
- name: Build with Gradle
34-
uses: gradle/gradle-build-action@v2.4.2
30+
uses: gradle/gradle-build-action@v2.6.0
3531
with:
3632
arguments: check
37-
# arguments: build check publish
3833
env:
3934
ossrhUsername: ${{ secrets.OSSRHPASSWORD }}
4035
ossrhPassword: ${{ secrets.OSSRHUSERNAME }}

.github/workflows/gradle_publish.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
66
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
77

8-
name: Java CI with Gradle
8+
name: Gradle publish Snapshot
99

1010
on:
11-
push:
12-
branches: [ "master" ]
11+
workflow_dispatch:
1312

1413
permissions:
1514
contents: read
1615

1716
jobs:
18-
build:
17+
publish:
1918

2019
runs-on: ubuntu-latest
2120

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
33

4-
name: Java CI with Maven
4+
name: Maven CI
55

66
on:
77
push:
@@ -10,7 +10,7 @@ on:
1010
branches: [ master ]
1111

1212
jobs:
13-
build:
13+
package:
1414

1515
runs-on: ubuntu-latest
1616
strategy:

.github/workflows/maven_deploy.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
name: deploy to sonatype snapshots
1+
name: Maven deploy snapshot
22

33
on:
4-
workflow_dispatch:
4+
push:
5+
branches: [ "master" ]
56

67
jobs:
7-
build:
8+
deploy:
89

910
runs-on: ubuntu-latest
1011
strategy:

build.gradle

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def getVersion = { boolean considerSnapshot ->
6464
}
6565

6666
// for publishing a release, call Gradle with Environment Variable RELEASE:
67-
// RELEASE=true gradle JSQLParser:publish
67+
// RELEASE=true gradle JSQLParser:publish
6868
version = getVersion( !System.getenv("RELEASE") )
6969
group = 'com.github.jsqlparser'
7070
description = 'JSQLParser library'
@@ -298,7 +298,7 @@ pmd {
298298

299299
checkstyle {
300300
sourceSets = [sourceSets.main, sourceSets.test]
301-
configFile =rootProject.file('config/checkstyle/checkstyle.xml')
301+
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
302302
}
303303

304304
spotless {
@@ -540,21 +540,14 @@ publishing {
540540
repositories {
541541
maven {
542542
name "ossrh"
543-
544-
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
545-
def snapshotsRepoUrl= "https://oss.sonatype.org/content/repositories/snapshots"
543+
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
544+
def snapshotsRepoUrl= "https://oss.sonatype.org/content/repositories/snapshots/"
546545
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
547546
credentials {
548547
username = System.getenv("ossrhUsername")
549548
password = System.getenv("ossrhPassword")
550549
}
551550
}
552-
// maven {
553-
// name = "GitHubPackages"
554-
//
555-
// url = uri("https://maven.pkg.github.com/JSQLParser/jsqlparser")
556-
// credentials(PasswordCredentials)
557-
// }
558551
}
559552
}
560553

0 commit comments

Comments
 (0)