diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 40dff28..2677a3b 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -1,6 +1,11 @@
name: Java CI
-on: [push]
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ types: [opened, synchronize, reopened]
jobs:
build:
@@ -8,10 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@master
- - name: Set up JDK 11
- uses: actions/setup-java@v1
- with:
- version: 11
- - name: Build with Maven
- run: mvn package --file pom.xml
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
+ - name: Set up JDK
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11
+
+ - name: Build with Maven
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ run: mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar --file pom.xml -DtrimStackTrace=false -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=fco -Dsonar.projectKey=frode-carlsen_cron
+
diff --git a/java8/pom.xml b/java8/pom.xml
index c92eaf8..2714b5f 100644
--- a/java8/pom.xml
+++ b/java8/pom.xml
@@ -4,7 +4,7 @@
fc.cron
cron
- 1.5
+ ${revision}${sha1}${changelist}
cron-java8
jar
diff --git a/jodatime/pom.xml b/jodatime/pom.xml
index 2756654..cc2da03 100644
--- a/jodatime/pom.xml
+++ b/jodatime/pom.xml
@@ -6,7 +6,7 @@
fc.cron
cron
- 1.5
+ ${revision}${sha1}${changelist}
cron-jodatime
diff --git a/pom.xml b/pom.xml
index 5d18120..81784fb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,10 +5,18 @@
fc.cron
cron
pom
- 1.6-SNAPSHOT
+ ${revision}${sha1}${changelist}
cron
https://github.com/frode-carlsen/cron
+
+ 1.6
+
+ -SNAPSHOT
+ UTF-8
+ UTF-8
+
+
Apache License Version 2.0
@@ -78,8 +86,4 @@
-
- UTF-8
- UTF-8
-