Skip to content

Commit ea86fbc

Browse files
Merge pull request #8 from dynamiatools/7.x
auto deploy to maven central support
2 parents cb3a82b + f6763b2 commit ea86fbc

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 --file sources/pom.xml
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)