Skip to content

Commit 75b2133

Browse files
committed
modify it to be closer to example in jreleaser docs
1 parent 4d80e30 commit 75b2133

File tree

1 file changed

+12
-26
lines changed

1 file changed

+12
-26
lines changed

.github/workflows/trigger-java-publish.yml

+12-26
Original file line numberDiff line numberDiff line change
@@ -31,35 +31,27 @@ jobs:
3131
echo "package org.peerdas.kzg; public class DummyClass { public static void main(String[] args) { System.out.println(\"Hello from PeerDAS KZG DummyClass\"); } }" > src/main/java/org/peerdas/kzg/DummyClass.java
3232
3333
echo "plugins {
34-
id 'java'
34+
id 'java-library'
3535
id 'maven-publish'
36-
id 'signing'
3736
id 'org.jreleaser' version '1.12.0'
3837
}
3938
4039
group = 'io.github.kevaundray.dummy'
4140
version = '0.0.1-SNAPSHOT'
4241
43-
ext.projectDescription = 'A dummy library for testing PeerDAS KZG operations publication'
44-
def year = java.time.Year.now().getValue()
45-
def copyrightYear = (year == 2024) ? \"2024\" : \"2024-\$year\"
46-
4742
java {
4843
withJavadocJar()
4944
withSourcesJar()
5045
}
5146
52-
repositories {
53-
mavenCentral()
54-
}
55-
5647
publishing {
5748
publications {
58-
mavenJava(MavenPublication) {
49+
maven(MavenPublication) {
5950
from components.java
51+
6052
pom {
6153
name = 'PeerDAS KZG Dummy Library'
62-
description = projectDescription
54+
description = 'A dummy library for testing PeerDAS KZG operations publication'
6355
url = 'https://github.com/crate-crypto/peerdas-kzg'
6456
licenses {
6557
license {
@@ -82,20 +74,15 @@ jobs:
8274
}
8375
}
8476
}
85-
}
8677
87-
signing {
88-
def signingKey = System.getenv('GPG_PRIVATE_KEY')
89-
def signingPassword = System.getenv('GPG_PASSPHRASE')
90-
useInMemoryPgpKeys(signingKey, signingPassword)
91-
sign publishing.publications.mavenJava
78+
repositories {
79+
maven {
80+
url = layout.buildDirectory.dir('staging-deploy')
81+
}
82+
}
9283
}
9384
9485
jreleaser {
95-
project {
96-
description = projectDescription
97-
copyright = \"Copyright © \${copyrightYear} The PeerDAS KZG authors\"
98-
}
9986
signing {
10087
active = 'ALWAYS'
10188
armored = true
@@ -106,7 +93,8 @@ jobs:
10693
sonatype {
10794
active = 'ALWAYS'
10895
url = 'https://central.sonatype.com/api/v1/publisher'
109-
stagingRepository('target/staging-deploy')
96+
stagingRepository('build/staging-deploy')
97+
snapshotUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
11098
}
11199
}
112100
}
@@ -124,10 +112,8 @@ jobs:
124112
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY_JAVA_PUBLISHING }}
125113
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY_JAVA_PUBLISHING }}
126114
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
127-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY_JAVA_PUBLISHING }}
128-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE_JAVA_PUBLISHING }}
129115
run: |
130-
./gradlew jreleaserDeploy --stacktrace --info
116+
./gradlew clean publish jreleaserDeploy --stacktrace --info
131117
132118
- name: JReleaser output
133119
if: always()

0 commit comments

Comments
 (0)