-
Notifications
You must be signed in to change notification settings - Fork 95
50 lines (47 loc) · 1.49 KB
/
CI.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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: CI
on:
push:
branches:
- master
- '[0-9]+.[0-9]+*'
pull_request:
branches:
- master
- '[0-9]+.[0-9]+*'
jobs:
# Run build and test
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B clean install -Pextjs,h2_disk,auditing
## Only on push event, publish on geosolutions maven repo
publish:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.repository == 'geosolutions-it/geostore' }}
needs: build
concurrency: ci-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
server-id: geosolutions
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
run: mvn clean install deploy -Ppostgres,extjs
env:
MAVEN_USERNAME: ${{ secrets.GS_MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.GS_MAVEN_PASSWORD }}