Skip to content

Commit 0766f54

Browse files
committed
Create maven-publish.yml
Adding release action flow on merge to main
1 parent c364b86 commit 0766f54

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v3
20+
with:
21+
java-version: '17'
22+
distribution: 'temurin'
23+
server-id: github
24+
settings-path: ${{ github.workspace }}
25+
26+
- uses: s4u/[email protected]
27+
with:
28+
servers: '[{"id": "ossrh", "username": ${{ secrets.DISTRIBUTION_REPOSITORY_RELEASE_USERNAME }}, "password": ${{ secrets.DISTRIBUTION_REPOSITORY_RELEASE_PASSWORD }}}]'
29+
- name: Release to production
30+
run: mvn clean release:clean release:prepare release:perform -B -DaltDeploymentRepository=ossrh::https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/

0 commit comments

Comments
 (0)