File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 uses : ./.github/workflows/shared-build-and-deploy.yml
88 with :
99 ref : ${{ github.ref_name }}
10- server-id : ossrh
10+ server-id : central
1111 profile : maven-central
1212 tag : ' beta'
13+ module : ' v3'
1314 secrets :
1415 server-username : ${{ secrets.CENTRAL_PUBLISHER_PORTAL_USERNAME }}
1516 server-password : ${{ secrets.CENTRAL_PUBLISHER_PORTAL_PASSWORD }}
Original file line number Diff line number Diff line change 5959 fetch-depth : 0
6060
6161 - name : Set up maven or jfrog repository
62- uses : actions/setup-java@v1
62+ uses : actions/setup-java@v4
6363 with :
64- java-version : " 1.8 "
64+ java-version : " 11 "
6565 distribution : " adopt"
6666 server-id : ${{ inputs.server-id }}
6767 server-username : SERVER_USERNAME
9494 if ${{ inputs.tag == 'internal' }}; then
9595 ./scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}" "$(git rev-parse --short "$GITHUB_SHA")"
9696 else
97- ./scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}"
97+ ./scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}" "" "${{ inputs.module }}"
9898 fi
9999
100100 - name : Commit changes
@@ -133,11 +133,11 @@ jobs:
133133
134134 - name : Publish package
135135 run : |
136- if [ -n "${{ inputs.module }}" ]; then
137- mvn --batch-mode -pl v3 -am deploy -P jfrog
138- else
139- mvn --batch-mode deploy -P ${{ inputs.profile }}
140- fi
136+ if [[ "${{ inputs.tag }}" == "internal" ] ]; then
137+ mvn --batch-mode -pl ${{ inputs.module }} -am deploy -P jfrog
138+
139+ elif [[ "${{ inputs.tag }}" == "beta" || " ${{ inputs.tag }}" == "public" ]]; then
140+ mvn --batch-mode -pl ${{ inputs.module }} -am deploy -P ${{ inputs.profile }}
141141
142142 env :
143143 SERVER_USERNAME : ${{ secrets.server-username }}
Original file line number Diff line number Diff line change 275275 </snapshotRepository >
276276 </distributionManagement >
277277 </profile >
278+ <profile >
279+ <id >maven-central</id >
280+ <distributionManagement >
281+ <repository >
282+ <id >central</id >
283+ <url >https://central.sonatype.com/api/v1/publisher/upload</url >
284+ </repository >
285+ <snapshotRepository >
286+ <id >central-snapshots</id >
287+ <url >https://central.sonatype.com/api/v1/publisher/upload</url >
288+ </snapshotRepository >
289+ </distributionManagement >
290+ <build >
291+ <plugins >
292+ <plugin >
293+ <groupId >org.sonatype.central</groupId >
294+ <artifactId >central-publishing-maven-plugin</artifactId >
295+ <version >0.4.0</version >
296+ <extensions >true</extensions >
297+ <configuration >
298+ <publishingServerId >central</publishingServerId >
299+ <tokenAuth >true</tokenAuth >
300+ <autoPublish >true</autoPublish >
301+ </configuration >
302+ </plugin >
303+ </plugins >
304+ </build >
305+ </profile >
278306 </profiles >
279307</project >
You can’t perform that action at this time.
0 commit comments