Skip to content

Commit f4bcfdb

Browse files
committed
Release handling
* upload plugin jar on every build * upload artifact to release after publishing * run the release-drafter only on master
1 parent b703ec7 commit f4bcfdb

File tree

5 files changed

+64
-40
lines changed

5 files changed

+64
-40
lines changed

.github/workflows/maven.yml

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,38 @@
11
name: CI
22

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

513
jobs:
614
build:
7-
815
runs-on: ubuntu-latest
9-
1016
steps:
11-
- uses: actions/checkout@v1
12-
- name: Set up JDK 1.11
13-
uses: actions/setup-java@v1
14-
with:
15-
java-version: 1.11
16-
- name: Build with Maven
17-
run: mvn -B package --file pom.xml
18-
- name: Upload coverage to Codecov
19-
uses: codecov/codecov-action@v1
20-
with:
21-
token: ${{ secrets.CODECOV_TOKEN }} #required
17+
- uses: actions/[email protected]
18+
- name: Set up JDK 1.11
19+
uses: actions/[email protected]
20+
with:
21+
distribution: 'adopt'
22+
java-version: '11'
23+
check-latest: true
24+
cache: 'maven'
25+
- name: Build with Maven
26+
run: mvn -B package --file pom.xml
27+
- name: Upload coverage to Codecov
28+
uses: codecov/[email protected]
29+
with:
30+
token: ${{ secrets.CODECOV_TOKEN }} #required
31+
- id: get-version
32+
name: Get maven project version
33+
uses: jactions/[email protected]
34+
- name: Upload plugin artifact
35+
uses: actions/[email protected]
36+
with:
37+
name: plugin
38+
path: sonar-flutter-plugin/target/sonar-flutter-plugin-${{ steps.get-version.outputs.version }}.jar

.github/workflows/release-drafter.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66
workflow_dispatch:
77
push:
88
branches:
9-
- develop
9+
- master
1010

1111
jobs:
1212
update_release_draft:
13-
if: github.repository_owner == 'insideapp-oss'
1413
runs-on: ubuntu-latest
1514
steps:
16-
- uses: release-drafter/[email protected]
15+
- id: release-drafter
16+
uses: release-drafter/[email protected]
1717
env:
1818
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
name: Build and upload release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/[email protected]
13+
- name: Set up JDK 1.11
14+
uses: actions/[email protected]
15+
with:
16+
distribution: 'adopt'
17+
java-version: '11'
18+
check-latest: true
19+
cache: 'maven'
20+
- name: Build with Maven
21+
run: mvn -B package --file pom.xml
22+
- name: Upload release artifact
23+
uses: shogo82148/[email protected]
24+
with:
25+
upload_url: ${{ github.event.release.upload_url }}
26+
asset_path: sonar-flutter-plugin/target/sonar-flutter-plugin-*.jar

.github/workflows/update-changelog.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Please check the Github releases for newer changelogs!
2+
3+
---
4+
15
## 0.3.2
26

37
#### Breaking

0 commit comments

Comments
 (0)