Skip to content

Commit 0b73028

Browse files
committed
Update URLs to Central Publishing Portal while keeping OSSRH secrets
1 parent 36586e6 commit 0b73028

File tree

1 file changed

+11
-32
lines changed

1 file changed

+11
-32
lines changed

.github/workflows/maven-central.yml

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,24 @@ on:
55
tags:
66
- 'v*'
77
branches:
8-
- 'feature/release-1'
8+
- 'feature/release-*'
99

1010
jobs:
1111
publish:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
15-
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
1619
- name: Set up JDK 8
1720
uses: actions/setup-java@v4
1821
with:
1922
java-version: '8'
2023
distribution: 'temurin'
21-
cache: 'maven'
22-
24+
cache: maven
25+
2326
- name: Setup GPG
2427
run: |
2528
echo "Setting up GPG..."
@@ -80,11 +83,7 @@ jobs:
8083
8184
# Test connection to Sonatype
8285
curl -v -u "${{ secrets.OSSRH_USERNAME_TOKEN }}:${{ secrets.OSSRH_PASSWORD_TOKEN }}" \
83-
https://s01.oss.sonatype.org/service/local/user/profile
84-
85-
# Test Maven connection
86-
mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout
87-
mvn help:evaluate -Dexpression=settings.servers -q -DforceStdout
86+
https://central.sonatype.com/api/internal/repository/status
8887
8988
- name: Build and Publish
9089
env:
@@ -99,32 +98,12 @@ jobs:
9998
-Dgpg.keyname=${{ secrets.GPG_KEYNAME }} \
10099
-Dgpg.useagent=true \
101100
-Dmaven.test.failure.ignore=false \
102-
-DnexusUrl=https://s01.oss.sonatype.org/ \
103-
-DserverId=ossrh \
104-
-DaltDeploymentRepository=ossrh::default::https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ \
101+
-DaltDeploymentRepository=ossrh::default::https://central.sonatype.com/api/internal/repository/maven-central/ \
105102
-DrepositoryId=ossrh \
106103
-Dusername=${{ secrets.OSSRH_USERNAME_TOKEN }} \
107104
-Dpassword=${{ secrets.OSSRH_PASSWORD_TOKEN }} \
108105
-X \
109106
-e \
110107
--debug \
111108
-Dgpg.verbose=true \
112-
-Dgpg.debug=true
113-
114-
echo "Checking deployment status..."
115-
mvn nexus-staging:rc-list \
116-
-DserverId=ossrh \
117-
-Dusername=${{ secrets.OSSRH_USERNAME_TOKEN }} \
118-
-Dpassword=${{ secrets.OSSRH_PASSWORD_TOKEN }}
119-
120-
echo "Closing staging repository..."
121-
mvn nexus-staging:rc-close \
122-
-DserverId=ossrh \
123-
-Dusername=${{ secrets.OSSRH_USERNAME_TOKEN }} \
124-
-Dpassword=${{ secrets.OSSRH_PASSWORD_TOKEN }}
125-
126-
echo "Releasing to Maven Central..."
127-
mvn nexus-staging:rc-release \
128-
-DserverId=ossrh \
129-
-Dusername=${{ secrets.OSSRH_USERNAME_TOKEN }} \
130-
-Dpassword=${{ secrets.OSSRH_PASSWORD_TOKEN }}
109+
-Dgpg.debug=true

0 commit comments

Comments
 (0)