Skip to content

Commit feb020b

Browse files
committed
ci: add publish snapshot workflow
Signed-off-by: Daniel Garnier-Moiroux <[email protected]>
1 parent c802526 commit feb020b

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish Snapshot
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
name: Build branch
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout source code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up JDK 17
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '17'
19+
distribution: 'temurin'
20+
cache: 'maven'
21+
server-id: central
22+
server-username: MAVEN_USERNAME
23+
server-password: MAVEN_PASSWORD
24+
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
25+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
26+
27+
- name: Build and Test
28+
run: mvn clean verify
29+
30+
- name: Generate Java docs
31+
run: mvn -Pjavadoc -B javadoc:aggregate
32+
33+
- name: Build with Maven and deploy to Sonatype snapshot repository
34+
env:
35+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
36+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
37+
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
38+
run: |
39+
mvn -Pjavadoc -Prelease --batch-mode --update-snapshots deploy

0 commit comments

Comments
 (0)