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
33on :
44 push :
55 branches : [ main ]
6+ tags :
7+ - ' v*'
68 pull_request :
79 branches : [ main ]
810
1416 steps :
1517 - name : checkout gumtree
1618 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
1723 - name : build gumtree
1824 run : ./gradlew build
1925 - name : upload defects4j results
2935 name : coverage-report
3036 path : build/reports/jacoco/jacocoRootReport/html/
3137 - 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 ') }}
3339 run : ./gradlew publish
3440 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