File tree Expand file tree Collapse file tree 2 files changed +43
-2
lines changed
Expand file tree Collapse file tree 2 files changed +43
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Publishing to Sonatype
2+ on :
3+ push :
4+ # release:
5+ # types: [published]
6+
7+ env :
8+ GH_TOKEN : ${{ github.token }}
9+
10+ jobs :
11+ build_and_publish :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Check out repository code
15+ uses : actions/checkout@v3
16+ - name : Set up JDK 8
17+ uses : actions/setup-java@v3
18+ with :
19+ java-version : ' 8.0.362'
20+ distribution : ' zulu'
21+ - name : Prepare gradle.properties
22+ run : |
23+ cd sift
24+ echo "$(pwd)"
25+ echo -e "${{ secrets.SECRING }}" | base64 -d > ./secring.gpg
26+ echo "$(ls -la)"
27+ echo "signing.keyId=${{ secrets.KEYID }}" >> ./gradle.properties
28+ echo "signing.password=${{ secrets.PASS }}" >> ./gradle.properties
29+ echo "signing.secretKeyRingFile=$(pwd)/secring.gpg" >> ./gradle.properties
30+ echo "NEXUS_USERNAME=${{ secrets.SUSER }}" >> ./gradle.properties
31+ echo "NEXUS_PASSWORD=${{ secrets.SPASSWORD }}" >> ./gradle.properties
32+ echo "$(ls -la)"
33+ - name : Sonatype Publish
34+ run : |
35+ cd sift
36+ ./gradlew uploadArchives
37+ BEARER=$(printf "${{ secrets.SUSER }}:${{ secrets.SPASSWORD }}" | base64)
38+ curl --request POST \
39+ --verbose \
40+ --header "Authorization: Bearer ${BEARER}" \
41+ https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/${{ secrets.SREPO_ID }}
Original file line number Diff line number Diff line change @@ -23,12 +23,12 @@ def isReleaseBuild() {
2323
2424def getReleaseRepositoryUrl () {
2525 return hasProperty(' RELEASE_REPOSITORY_URL' ) ? RELEASE_REPOSITORY_URL
26- : " https://oss. sonatype.org /service/local/staging/deploy/maven2 /"
26+ : " https://ossrh-staging-api.central. sonatype.com /service/local/"
2727}
2828
2929def getSnapshotRepositoryUrl () {
3030 return hasProperty(' SNAPSHOT_REPOSITORY_URL' ) ? SNAPSHOT_REPOSITORY_URL
31- : " https://oss .sonatype.org/content/repositories/ snapshots/"
31+ : " https://central .sonatype.com/repository/maven- snapshots/"
3232}
3333
3434def getRepositoryUsername () {
You can’t perform that action at this time.
0 commit comments