Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
065cc4f
added manual deployment(release) step for the Publisher Portal
ahavryliuk-sift Jul 30, 2025
db44a11
allow to run from branch for testing
ahavryliuk-sift Jul 30, 2025
b7ef139
on push publish for testing
ahavryliuk-sift Jul 30, 2025
73eacd6
fixed some vars
ahavryliuk-sift Jul 30, 2025
a74cc07
sonatype host changed
ahavryliuk-sift Jul 30, 2025
88a12d7
sonatype maven repo name changed
ahavryliuk-sift Jul 30, 2025
2de68ae
sonatype maven repo name changed
ahavryliuk-sift Jul 30, 2025
a463a15
debug flag for gradlew
ahavryliuk-sift Jul 30, 2025
3ee9656
Portal Publisher API test
ahavryliuk-sift Jul 30, 2025
c18e521
Portal Publisher API auth with Bearer
ahavryliuk-sift Jul 30, 2025
f573082
auth with Bearer attempt
ahavryliuk-sift Jul 30, 2025
c68a5b4
back to basic auth attempt
ahavryliuk-sift Jul 30, 2025
09e4adb
fixed yml
ahavryliuk-sift Jul 30, 2025
0d11634
publisher url changed
ahavryliuk-sift Jul 30, 2025
88d9c20
back to ossrh
ahavryliuk-sift Jul 30, 2025
4cbc6c1
change url
iprysiazhnyi-sift Jul 30, 2025
7d01777
change url
iprysiazhnyi-sift Jul 30, 2025
11eb876
change requests order
iprysiazhnyi-sift Jul 30, 2025
1cf1fef
adds scan flag
iprysiazhnyi-sift Jul 30, 2025
f8e5969
remove staging
iprysiazhnyi-sift Jul 30, 2025
9ba7a64
revert back staging
iprysiazhnyi-sift Jul 30, 2025
5d8effd
commented signing zip/tar
iprysiazhnyi-sift Jul 30, 2025
998ac20
test another signing approach
iprysiazhnyi-sift Jul 30, 2025
9acc6cc
fixes signing properties
iprysiazhnyi-sift Jul 30, 2025
86113f2
Use signing approach with secring
iprysiazhnyi-sift Jul 30, 2025
d72c31c
comments manual signing of pom
iprysiazhnyi-sift Jul 30, 2025
ca2fccb
code clean up
iprysiazhnyi-sift Jul 30, 2025
ece439f
revert back Publishing for the release only
iprysiazhnyi-sift Jul 31, 2025
ec2e22c
revert back Publishing for the release only
iprysiazhnyi-sift Jul 31, 2025
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
9 changes: 7 additions & 2 deletions .github/workflows/publishing2sonatype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:
run: |
sed -i -e 's|.*sonatypeUsername.*| username = "${{ secrets.SUSER }}"|' ./build.gradle
sed -i -e 's|.*sonatypePassword.*| password = "${{ secrets.SPASSWORD }}"|' ./build.gradle
- name: Publish to Sonatype
- name: Sonatype Publish
run: |
./gradlew publishJarPublicationToStagingRepository
./gradlew publishJarPublicationToStagingRepository
BEARER=$(printf "${{ secrets.SUSER }}:${{ secrets.SPASSWORD }}" | base64)
curl --request POST \
--verbose \
--header "Authorization: Bearer ${BEARER}" \
https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/${{ secrets.SREPO_ID }}
45 changes: 6 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,12 @@ def pomConfig = {
inceptionYear 2016
organization {
name 'Sift Science'
url 'https://siftscience.com'
url 'https://sift.com'
}
developers {
developer {
id 'lopatin'
name 'Alex Lopatin'
url 'https://github.com/lopatin'
id 'sift-api-platform'
name 'Sift API Platform Team'
}
}
scm {
Expand Down Expand Up @@ -121,37 +120,6 @@ publishing {
last.parent().appendNode('description', 'Sift Science Java API')
last + pomConfig
}

// Sign the pom.xml.
pom.withXml {
def pomFile = file("${project.buildDir}/generated-pom.xml")
writeTo(pomFile)
def pomAscFile = signing.sign(pomFile).signatureFiles[0]
artifact(pomAscFile) {
classifier = null
extension = 'pom.asc'
}
pomFile.delete()
}

// Sign the artifacts.
project.tasks.signArchives.signatureFiles.each {
artifact(it) {
def matcher = it.file =~ /-(sources|javadoc)\.jar\.asc$/
def zipMatcher = it.file =~ /\.(zip|tar)\.asc$/
def extensionPrefix = 'jar'
if (zipMatcher.find()) {
extensionPrefix = zipMatcher.group(1)
}
if (matcher.find()) {
classifier = matcher.group(1)
} else {
classifier = null
}

extension = extensionPrefix + '.asc'
}
}
}
}

Expand All @@ -168,10 +136,9 @@ publishing {
}
}

model {
tasks.publishJarPublicationToStagingRepository {
dependsOn(project.tasks.signArchives)
}
signing {
required { gradle.taskGraph.hasTask("publish") }
sign publishing.publications.jar
}

distributions {
Expand Down