Skip to content

Commit d03f3b7

Browse files
committed
Add release workflow
1 parent d6a547e commit d03f3b7

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/maven-publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to MavenCentral
2+
3+
on:
4+
release:
5+
types: [ released ]
6+
7+
jobs:
8+
publish:
9+
name: Publish to MavenCentral
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out code
13+
uses: actions/checkout@v3
14+
- name: Set up JDK 11
15+
uses: actions/setup-java@v3
16+
with:
17+
distribution: adopt
18+
java-version: 11
19+
20+
- name: Publish to MavenCentral
21+
run: ./gradlew --max-workers 1 publishReleasePublicationToMavenLocal publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository
22+
env:
23+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
24+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
25+
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
26+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
27+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
28+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}

0 commit comments

Comments
 (0)