Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

Commit e2fe767

Browse files
authored
Merge pull request #34 from ndw/remove-jreleaser
Attempt to remove jreleaser
2 parents 6175716 + 54103e9 commit e2fe767

4 files changed

Lines changed: 44 additions & 89 deletions

File tree

.github/workflows/build-pr.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ jobs:
4747
CI_PROJECT_REPONAME: ${{ needs.check_branch.outputs.reponame }}
4848
CI_BRANCH: ${{ needs.check_branch.outputs.branch }}
4949
CI_TAG: ${{ needs.check_branch.outputs.tag }}
50-
JRELEASER_GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
5150
steps:
5251
- name: Checkout the branch
5352
uses: actions/checkout@v3
@@ -58,8 +57,3 @@ jobs:
5857
./gradlew -PsaxonVersion=11.5 clean test
5958
./gradlew -PsaxonVersion=12.1 clean test
6059
./gradlew clean dist
61-
62-
- name: testDeploy
63-
run: |
64-
./gradlew publish
65-
./gradlew jreleaserConfig

.github/workflows/build.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,7 @@ jobs:
4545
CI_PROJECT_REPONAME: ${{ needs.check_branch.outputs.reponame }}
4646
CI_BRANCH: ${{ needs.check_branch.outputs.branch }}
4747
CI_TAG: ${{ needs.check_branch.outputs.tag }}
48-
JRELEASER_GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
49-
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.SONATYPEUSER }}
50-
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SONATYPE_PASSWORD: ${{ secrets.SONATYPEPASS }}
51-
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE }}
52-
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC }}
53-
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
48+
BEARER: ${{ secrets.SONATYPE_TOKEN }}
5449
steps:
5550
- name: Checkout the branch
5651
uses: actions/checkout@v3
@@ -60,13 +55,12 @@ jobs:
6055
echo ./gradlew -PsaxonVersion=10.9 clean test
6156
echo ./gradlew -PsaxonVersion=11.5 clean test
6257
echo ./gradlew -PsaxonVersion=12.1 clean test
63-
echo ./gradlew clean dist website
58+
echo ./gradlew clean dist website mavenReleaseArtifact
6459
65-
- name: testDeploy
60+
- name: Deploy
61+
if: ${{ env.CI_BRANCH == 'master' && env.CI_TAG != '' }}
6662
run: |
67-
./gradlew publish
68-
./gradlew jreleaserConfig
69-
./gradlew jreleaserDeploy
63+
curl --request POST --verbose --header "Authorization: Bearer ${BEARER}" --form bundle="@build/distributions/maven-sinclude-${CI_TAG}" https://central.sonatype.com/api/v1/publisher/upload
7064
7165
- name: Deploy master to gh-pages
7266
if: ${{ env.HAVE_ACCESS_TOKEN == 'true' && env.CI_BRANCH == 'master' }}

build.gradle.kts

Lines changed: 37 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
import com.nwalsh.gradle.saxon.SaxonXsltTask
2-
import org.jreleaser.gradle.plugin.JReleaserExtension
3-
import org.jreleaser.model.Active
4-
import org.jreleaser.model.api.deploy.maven.MavenCentralMavenDeployer
52

63
buildscript {
74
repositories {
@@ -34,10 +31,10 @@ buildscript {
3431
plugins {
3532
id("java-library")
3633
id("maven-publish")
34+
id("signing")
3735
id("com.github.gmazzo.buildconfig") version "5.3.5"
3836
id("com.nwalsh.gradle.saxon.saxon-gradle") version "0.10.4"
3937
id("com.nwalsh.gradle.relaxng.validate") version "0.10.3"
40-
id("org.jreleaser") version "1.18.0"
4138
}
4239

4340
val saxonVersion = project.properties["saxonVersion"].toString()
@@ -109,6 +106,7 @@ tasks.jar {
109106
}
110107

111108
tasks.javadoc {
109+
options.memberLevel = JavadocMemberLevel.PUBLIC
112110
if (JavaVersion.current().isJava9Compatible) {
113111
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
114112
}
@@ -211,93 +209,62 @@ tasks.register<SaxonXsltTask>("website") {
211209
)
212210
}
213211

212+
tasks.register<Zip>("mavenReleaseArtifact") {
213+
dependsOn("publish")
214+
215+
from(layout.buildDirectory.dir("maven"))
216+
archiveFileName = "maven-${basename}-${sincludeVersion}.zip"
217+
}
218+
214219
// ============================================================
215220

216-
configure<PublishingExtension> {
221+
publishing {
222+
repositories {
223+
maven {
224+
url = uri("build/maven")
225+
}
226+
}
227+
217228
publications {
218-
register<MavenPublication>("maven") {
219-
from(components["java"])
229+
create<MavenPublication>("mavenSInclude") {
220230
pom {
221-
name.set(project.name)
222231
groupId = "com.nwalsh"
223232
artifactId = "sinclude"
224233
version = sincludeVersion
225-
description.set(project.description ?: project.name)
226-
url.set("https://github.com/ndw/sinclude")
234+
name = "Saxon XInclude"
235+
packaging = "jar"
236+
description = "An XInclude processor for Saxon"
237+
url = "https://github.com/ndw/sinclude"
238+
239+
scm {
240+
url = "scm:git@github.com:ndw/sinclude.git"
241+
connection = "scm:git@github.com:ndw/sinclude.git"
242+
developerConnection = "scm:git@github.com:ndw/sinclude.git"
243+
}
244+
227245
licenses {
228246
license {
229-
name.set("Apache License version 2.0")
230-
url.set("https://www.apache.org/licenses/LICENSE-2.0")
247+
name = "Apache License version 2.0"
248+
url = "https://www.apache.org/licenses/LICENSE-2.0"
249+
distribution = "repo"
231250
}
232251
}
252+
233253
developers {
234254
developer {
235-
id.set("com.nwalsh")
236-
name.set("Norman Walsh")
237-
email.set("ndw@nwalsh.com")
255+
id = "ndw"
256+
name = "Norman Walsh"
238257
}
239258
}
240-
scm {
241-
connection.set("scm:git@github.com:ndw/sinclude.git")
242-
developerConnection.set("scm:git@github.com:ndw/sinclude.git")
243-
url.set("https://github.com/ndw/sinclude")
244-
}
245259
}
246260

261+
from(components["java"])
247262
artifact(sourcesJar.get())
248263
artifact(javadocJar.get())
249264
}
250265
}
251-
252-
repositories {
253-
maven {
254-
url = layout.buildDirectory.dir("staging-deploy").get().asFile.toURI()
255-
}
256-
}
257266
}
258267

259-
configure<JReleaserExtension> {
260-
gitRootSearch = true
261-
project {
262-
group = "com.nwalsh"
263-
version = sincludeVersion
264-
description = "An XInclude processor for Saxon"
265-
authors = listOf("ndw")
266-
license = "Apache License version 2.0"
267-
links {
268-
homepage = "https://github.com/ndw/sinclude"
269-
bugTracker = "https://github.com/ndw/sinclude/issues"
270-
contact = "https://github.com/ndw/sinclude"
271-
}
272-
inceptionYear = "2020"
273-
vendor = "Norman Walsh"
274-
copyright = "Copyright (c)2020-2025 Norman Walsh"
275-
}
276-
277-
release {
278-
github {
279-
commitAuthor {
280-
name = "Norman Walsh"
281-
email = "ndw@nwalsh.com"
282-
}
283-
}
284-
}
285-
286-
signing {
287-
active = Active.ALWAYS
288-
armored = true
289-
}
290-
291-
deploy {
292-
maven {
293-
mavenCentral {
294-
register("sonatype") {
295-
active = Active.ALWAYS
296-
stage = MavenCentralMavenDeployer.Stage.UPLOAD
297-
url = "https://central.sonatype.com/api/v1/publisher"
298-
stagingRepositories.add("build/staging-deploy")
299-
}
300-
}
301-
}
302-
}
268+
signing {
269+
sign(publishing.publications["mavenSInclude"])
303270
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
basename=sinclude
22
sincludeTitle=Saxon XInclude
3-
sincludeVersion=5.4.1-X
3+
sincludeVersion=5.4.2
44

5-
saxonVersion=12.5
5+
saxonVersion=12.8

0 commit comments

Comments
 (0)