-
-
Notifications
You must be signed in to change notification settings - Fork 84
54 lines (44 loc) · 1.37 KB
/
release.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: Release
on:
push:
tags:
- 0.*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.7
- name: Retrieve tag name
uses: olegtarasov/get-tag@2.1.3
id: tag_name
- name: Set up JDK 1.11
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
check-latest: true
cache: 'maven'
- name: Set version
run: mvn versions:set -DnewVersion=$GIT_TAG_NAME
- 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: Upload release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{github.workspace}}/sonar-flutter-plugin/target/*.jar
tag: ${{ steps.tag_name.outputs.tag }}
overwrite: true
body: ${{steps.build_changelog.outputs.changelog}}
file_glob: true