-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (47 loc) · 1.56 KB
/
ci_jdk11_ubuntu.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
52
53
54
55
name: Build with JDK 11 on Ubuntu
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven/JDK 11 on Ubuntu
run: mvn --batch-mode --file pom.xml clean package
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Java for deployment to Sonatype snapshot repo
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
# must match distributionManagement/snapshotRepository/id in pom:
server-id: sonatype-nexus-snapshots
server-username: SONATYPE_OSSRH_USERNAME
server-password: SONATYPE_OSSRH_PASSWORD
- name: Deploy to Sonatype snapshot repo
run: mvn --batch-mode --file pom.xml --activate-profiles fast deploy
env:
SONATYPE_OSSRH_USERNAME: ${{ secrets.SONATYPE_OSSRH_USERNAME }}
SONATYPE_OSSRH_PASSWORD: ${{ secrets.SONATYPE_OSSRH_PASSWORD }}