Skip to content

Commit 43bfc7f

Browse files
author
Gilles Grousset
committed
fix(CI): updated script
1 parent 40c8c9a commit 43bfc7f

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

.github/workflows/maven.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
name: CI
22

3-
on:
4-
push:
5-
branches:
6-
- master
7-
- develop
8-
pull_request:
9-
branches:
10-
- master
11-
- develop
3+
on: [push]
124

135
jobs:
146
build:
@@ -17,6 +9,8 @@ jobs:
179

1810
- name: Checkout
1911
uses: actions/[email protected]
12+
with:
13+
fetch-depth: 0
2014

2115
- name: Set up JDK 1.11
2216
uses: actions/[email protected]
@@ -26,7 +20,10 @@ jobs:
2620
check-latest: true
2721
cache: 'maven'
2822

29-
- name: Build with Maven
23+
- name: License Header Check
24+
run: mvn license:check
25+
26+
- name: Build
3027
run: mvn -B package --file pom.xml
3128

3229
- name: Analyze
@@ -40,12 +37,17 @@ jobs:
4037
-Dsonar.organization=insideapp-oss \
4138
-Dsonar.projectKey=insideapp-oss_sonar-flutter
4239
43-
- id: get-version
44-
name: Get maven project version
45-
uses: jactions/[email protected]
40+
- name: Read version
41+
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
4642

47-
- name: Upload plugin artifact
48-
uses: actions/[email protected]
43+
- name: Upload snapshot release
44+
if: github.ref == 'refs/heads/develop'
45+
uses: svenstaro/upload-release-action@v2
4946
with:
50-
name: plugin
51-
path: sonar-flutter-plugin/target/sonar-flutter-plugin-${{ steps.get-version.outputs.version }}.jar
47+
repo_token: ${{ secrets.GITHUB_TOKEN }}
48+
file: ${{github.workspace}}/sonar-flutter-plugin/target/*.jar
49+
tag: ${{env.version}}
50+
overwrite: true
51+
body: "Snapshot release"
52+
file_glob: true
53+
prerelease: true

0 commit comments

Comments
 (0)