File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ name: Build, Test and Deploy GumTree
3
3
on :
4
4
push :
5
5
branches : [ main ]
6
+ tags :
7
+ - ' v*'
6
8
pull_request :
7
9
branches : [ main ]
8
10
14
16
steps :
15
17
- name : checkout gumtree
16
18
uses : actions/checkout@v2
19
+ - name : retrieve gumtree version
20
+ id : version
21
+ run : echo "::set-output name=version::$(cat build.gradle | grep "version =" | cut -f 2 -d "'")"
22
+ shell : bash
17
23
- name : build gumtree
18
24
run : ./gradlew build
19
25
- name : upload defects4j results
29
35
name : coverage-report
30
36
path : build/reports/jacoco/jacocoRootReport/html/
31
37
- name : upload snapshot package
32
- if : ${{ github.event_name == 'push' && contains(github.event.head_commit.message , '[snapshot] ') }}
38
+ if : ${{ github.event_name == 'push' && contains(steps.version.outputs.version , 'SNAPSHOT ') }}
33
39
run : ./gradlew publish
34
40
env :
35
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42
+ - name : upload release package
43
+ if : ${{ github.event_name == 'push' && !contains(steps.version.outputs.version, 'SNAPSHOT') && endsWith(github.ref, steps.version.outputs.version) }}
44
+ run : ./gradlew publish
45
+ env :
46
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47
+ - name : create github release
48
+ if : ${{ github.event_name == 'push' && !contains(steps.version.outputs.version, 'SNAPSHOT') && endsWith(github.ref, steps.version.outputs.version) }}
49
+ uses : ncipollo/release-action@v1
50
+ with :
51
+ artifacts : " dist/build/distributions/gumtree*.zip"
52
+ bodyFile : " CHANGELOG.md"
53
+ token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments