Skip to content

Commit e5ba5c7

Browse files
build: disable snasphot signing
1 parent 6c1caff commit e5ba5c7

File tree

4 files changed

+49
-8
lines changed

4 files changed

+49
-8
lines changed

.github/workflows/gradle.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ jobs:
3333
- name: Build with Gradle
3434
uses: gradle/[email protected]
3535
with:
36-
arguments: build check
36+
arguments: check
3737
# arguments: build check publish
3838
env:
39-
ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
40-
ossrhPassword: ${{ secrets.OSSRH_TOKEN }}
39+
ossrhUsername: ${{ secrets.OSSRHPASSWORD }}
40+
ossrhPassword: ${{ secrets.OSSRHUSERNAME }}

.github/workflows/gradle_publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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.
5+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
7+
8+
name: Java CI with Gradle
9+
10+
on:
11+
push:
12+
branches: [ "master" ]
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
- name: Set up JDK 11
27+
uses: actions/setup-java@v3
28+
with:
29+
java-version: '11'
30+
distribution: 'temurin'
31+
- name: Build with Gradle
32+
uses: gradle/[email protected]
33+
with:
34+
arguments: publish
35+
# arguments: build check publish
36+
env:
37+
ossrhUsername: ${{ secrets.OSSRHPASSWORD }}
38+
ossrhPassword: ${{ secrets.OSSRHUSERNAME }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [JSqlParser 4.7 Website](https://jsqlparser.github.io/JSqlParser) <img src="src/site/sphinx/_images/logo-no-background.svg" alt="drawing" width="200" align="right"/>
1+
# [JSqlParser 4.8 Website](https://jsqlparser.github.io/JSqlParser) <img src="src/site/sphinx/_images/logo-no-background.svg" alt="drawing" width="200" align="right"/>
22

33
![Build Status](https://github.com/JSQLParser/JSqlParser/actions/workflows/maven.yml/badge.svg)
44

build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,10 +544,9 @@ publishing {
544544
def releasesRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
545545
def snapshotsRepoUrl= "https://oss.sonatype.org/service/local/staging/deploy/maven2"
546546
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
547-
//credentials(PasswordCredentials)
548547
credentials {
549-
username = System.getenv("ossrhUsername")
550-
password = System.getenv("ossrhPassword")
548+
username = System.getenv("OSSRHPASSWORD")
549+
password = System.getenv("OSSRHUSERNAME")
551550
}
552551
}
553552
// maven {
@@ -563,7 +562,11 @@ signing {
563562
//def signingKey = findProperty("signingKey")
564563
//def signingPassword = findProperty("signingPassword")
565564
//useInMemoryPgpKeys(signingKey, signingPassword)
566-
sign publishing.publications.mavenJava
565+
566+
// don't sign SNAPSHOTS
567+
if (!version.endsWith('SNAPSHOT')) {
568+
sign publishing.publications.mavenJava
569+
}
567570
}
568571

569572
tasks.withType(JavaCompile).configureEach {

0 commit comments

Comments
 (0)