Skip to content

Commit 5183068

Browse files
SK-2276: Beta release workflow changes for v3 (#210)
* SK-2276: beta release workflow changes
1 parent 49d8511 commit 5183068

3 files changed

Lines changed: 38 additions & 9 deletions

File tree

.github/workflows/beta-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ jobs:
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 }}

.github/workflows/shared-build-and-deploy.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ jobs:
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
@@ -94,7 +94,7 @@ jobs:
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 }}

pom.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,5 +275,33 @@
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>

0 commit comments

Comments
 (0)