Skip to content

Commit ee27c4c

Browse files
committed
Automatically deploy snapshots to central
1 parent 4b4fa14 commit ee27c4c

File tree

2 files changed

+42
-16
lines changed

2 files changed

+42
-16
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ jobs:
1717
os: [ 'ubuntu-latest', 'windows-latest' ]
1818
runs-on: ${{ matrix.os }}
1919
steps:
20-
- uses: actions/checkout@v4
21-
- name: Set up JDK
22-
uses: actions/setup-java@v4
23-
with:
24-
distribution: 'temurin'
25-
java-version: ${{ matrix.java }}
26-
- name: Set up Maven
27-
uses: stCarolas/[email protected]
28-
with:
29-
maven-version: ${{ matrix.maven }}
30-
- name: print Maven and Java versions
31-
run: mvn --version
32-
- name: Build
33-
run: mvn -ntp -B clean verify
34-
- name: Generate site
35-
run: mvn -ntp -B clean site -P publicsite
20+
- uses: actions/checkout@v4
21+
- name: Set up JDK
22+
uses: actions/setup-java@v4
23+
with:
24+
distribution: 'temurin'
25+
java-version: ${{ matrix.java }}
26+
- name: Set up Maven
27+
uses: stCarolas/[email protected]
28+
with:
29+
maven-version: ${{ matrix.maven }}
30+
- name: print Maven and Java versions
31+
run: mvn --version
32+
- name: Build
33+
run: mvn -ntp -B clean verify
34+
- name: Generate site
35+
run: mvn -ntp -B clean site -P publicsite

.github/workflows/snapshot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Deploy snapshot
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up JDK
14+
uses: actions/setup-java@v4
15+
with:
16+
distribution: 'temurin'
17+
java-version: '17'
18+
cache: maven
19+
server-id: central
20+
server-username: SONATYPE_USERNAME
21+
server-password: SONATYPE_PASSWORD
22+
- name: Deploy snapshot
23+
run: mvn clean deploy -P release
24+
env:
25+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
26+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

0 commit comments

Comments
 (0)