-
Notifications
You must be signed in to change notification settings - Fork 10
51 lines (46 loc) · 1.27 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build & test
on:
push:
branches:
- master
- '[0-9]+.[0-9]+'
pull_request:
branches:
- master
- '[0-9]+.[0-9]+'
schedule:
- cron: '0 4 * * *'
jobs:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Test with Maven
run: mvn clean test
publish:
name: Deploy to OSSRH
if: ${{ github.repository_owner == 'sirixdb' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '21'
server-id: sonatype-nexus-snapshots
server-username: SONATYPE_NEXUS_USERNAME
server-password: SONATYPE_NEXUS_PASSWORD
- name: Maven deploy
run: mvn --batch-mode deploy -DskipTests
env:
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}