Skip to content

Commit 451aa59

Browse files
committed
Fix publish workflow
1 parent efee39c commit 451aa59

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
run: diff <(echo "${{ github.ref_name }}") <(echo "$(mvn -B help:evaluate -Dexpression=project.version -q -DforceStdout)")
2626

2727
- name: Set up JDK 11
28-
uses: actions/setup-java@v3
28+
uses: actions/setup-java@v4
2929
with:
3030
java-version: '11'
31-
distribution: 'adopt'
31+
distribution: 'temurin'
3232
cache: maven
3333

3434
- name: Build
@@ -38,21 +38,20 @@ jobs:
3838
run: mvn $MAVEN_CLI_OPTS $JAVA_ADDITIONAL_OPTS test
3939

4040
- name: Set up Apache Maven Central
41-
uses: actions/setup-java@v3
41+
uses: actions/setup-java@v4
4242
with:
4343
java-version: '11'
44-
distribution: 'adopt'
44+
distribution: 'temurin'
4545
server-id: ossrh
46-
server-username: SONATYPE_USERNAME
47-
server-password: SONATYPE_PASSWORD
46+
server-username: MAVEN_USERNAME
47+
server-password: MAVEN_PASSWORD
4848
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
4949
gpg-passphrase: GPG_PRIVATE_KEY_PASSWORD
5050

5151
- name: Publish to Apache Maven Central
5252
if: github.event.release
53-
# Deploy only flink-elastic-catalog
5453
run: mvn -f pom.xml deploy -P release -DskipTests
5554
env:
56-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
57-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
55+
MAVEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_USERNAME }}
56+
MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASSWORD }}
5857
GPG_PRIVATE_KEY_PASSWORD: ${{ secrets.GPG_PRIVATE_KEY_PASSWORD }}

pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
<url>https://github.com/getindata/flink-connector-jdbc-elasticsearch-dialect/tree/main</url>
3636
</scm>
3737

38+
<distributionManagement>
39+
<snapshotRepository>
40+
<id>ossrh</id>
41+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
42+
</snapshotRepository>
43+
<repository>
44+
<id>ossrh</id>
45+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
46+
</repository>
47+
</distributionManagement>
48+
3849
<properties>
3950
<maven.compiler.source>11</maven.compiler.source>
4051
<maven.compiler.target>11</maven.compiler.target>

0 commit comments

Comments
 (0)