Skip to content

Commit 6e2316d

Browse files
deploy setup
1 parent 0862b56 commit 6e2316d

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Version 5.0.0
2+
# This workflow will build a Java project with Maven
3+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
4+
5+
name: Release and Deploy
6+
7+
on:
8+
release:
9+
types: [ created ]
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v4
20+
with:
21+
java-version: 17
22+
architecture: x64
23+
distribution: corretto
24+
cache: maven
25+
server-id: ossrh
26+
server-username: MAVEN_USERNAME # env variable for username in deploy
27+
server-password: MAVEN_PASSWORD # env variable for token in deploy
28+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
29+
30+
- name: Build with Maven
31+
run: mvn clean javadoc:jar source:jar deploy -P release-sign-artifacts
32+
env:
33+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
34+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
35+
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

0 commit comments

Comments
 (0)