Skip to content

Commit 3275561

Browse files
authored
Create release.yml
Signed-off-by: Dmitry Sulman <[email protected]>
1 parent 4b7f926 commit 3275561

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/release.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Release to Maven Central
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '17'
21+
distribution: 'temurin'
22+
23+
- name: Setup Gradle
24+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
25+
26+
- name: Build with Gradle Wrapper
27+
run: ./gradlew build
28+
29+
release:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
permissions:
33+
contents: read
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Set up JDK 17
38+
uses: actions/setup-java@v4
39+
with:
40+
java-version: '17'
41+
distribution: 'temurin'
42+
43+
- name: Setup Gradle
44+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
45+
46+
- name: Deploy to Maven Central
47+
run: ./gradlew clean jreleaserFullRelease
48+
env:
49+
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
50+
JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.JRELEASER_MAVENCENTRAL_PASSWORD }}
51+
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
52+
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
53+
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}

0 commit comments

Comments
 (0)