-
-
Notifications
You must be signed in to change notification settings - Fork 82
54 lines (45 loc) · 1.52 KB
/
maven.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
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up JDK 1.11
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: '11'
check-latest: true
cache: 'maven'
- name: License Header Check
run: mvn license:check
- name: Build
run: mvn -B package --file pom.xml
- name: Analyze
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.login=$SONAR_TOKEN \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.organization=insideapp-oss \
-Dsonar.projectKey=insideapp-oss_sonar-flutter
- name: Read version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
- name: Upload snapshot release
if: github.ref == 'refs/heads/develop'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{github.workspace}}/sonar-flutter-plugin/target/*.jar
tag: ${{env.version}}
release_name: ${{env.version}}
overwrite: true
body: "Snapshot release"
file_glob: true
prerelease: true