Skip to content

Commit ddc76ac

Browse files
authored
Implement a workflow to release serde api (#3049)
1 parent 4dc0f6d commit ddc76ac

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release-serde-api
2+
on: workflow_dispatch
3+
4+
jobs:
5+
release-serde-api:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3
9+
with:
10+
fetch-depth: 0
11+
12+
- run: |
13+
git config user.name github-actions
14+
git config user.email [email protected]
15+
16+
- name: Set up JDK
17+
uses: actions/setup-java@v3
18+
with:
19+
java-version: "17"
20+
distribution: "zulu"
21+
cache: "maven"
22+
23+
- id: install-secret-key
24+
name: Install GPG secret key
25+
run: |
26+
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
27+
28+
- name: Publish to Maven Central
29+
run: |
30+
MVN_VERSION=$(curl -s https://search.maven.org/solrsearch/select?q=g:"com.provectus"+AND+a:"kafka-ui-serde-api" | grep -o '"latestVersion": *"[^"]*"' | grep -o '"[^"]*"$' | sed 's/"//g')
31+
MVN_VERSION=$(echo "$MVN_VERSION" | awk 'BEGIN{FS=OFS="."} {$2+=1} 1')
32+
mvn -B -ntp versions:set -DnewVersion=$MVN_VERSION -pl kafka-ui-serde-api
33+
mvn source:jar javadoc:jar package gpg:sign -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} -Dserver.username=${{ secrets.NEXUS_USERNAME }} -Dserver.password=${{ secrets.NEXUS_PASSWORD }} nexus-staging:deploy -pl kafka-ui-serde-api -s settings.xml

0 commit comments

Comments
 (0)