Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ jobs:
key: gradle

- name: Build library
run: ./gradlew build publishToMavenLocal --warning-mode all
run: |
# Skip signing for PR builds (secrets not available from forks)
SIGNING_FLAG=""
if [ "${{ github.event_name }}" = "pull_request" ]; then
SIGNING_FLAG="-PskipSigning=true"
fi
./gradlew build publishToMavenLocal --warning-mode all $SIGNING_FLAG
env:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
Expand Down
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ javadoc.options.encoding = "UTF-8"

mavenPublishing {
publishToMavenCentral("CENTRAL_PORTAL")
signAllPublications()

// Skip signing for staging/CI jobs (e.g., Dependabot PRs) by passing -PskipSigning=true
if (!project.hasProperty('skipSigning') || !project.property('skipSigning').toBoolean()) {
signAllPublications()
}

coordinates("io.github.besi97", "graphql-java-codegen", graphqlCodegenVersion)

Expand Down
Loading