Skip to content

Commit 605af38

Browse files
authored
Merge pull request #34 from dericop/master
CI CD Pipelines
2 parents 7862dd9 + 039e33b commit 605af38

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/main.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: 'reactive-commons-ci-cd'
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
pull_request:
9+
branches:
10+
- master
11+
12+
release:
13+
types:
14+
- created
15+
16+
jobs:
17+
build:
18+
if: github.event_name != 'release'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up JDK 1.8
23+
uses: actions/setup-java@v1
24+
with:
25+
java-version: 1.8
26+
- name: Grant execute permission for gradlew
27+
run: chmod +x gradlew
28+
- name: Execute jacocoTestReport
29+
run: ./gradlew test jacocoTestReport && cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed"
30+
- name: Build with Gradle
31+
run: ./gradlew build --refresh-dependencies --no-daemon --continue
32+
- name: Push codeCoverage to Codecov
33+
run: bash <(curl -s https://codecov.io/bash)
34+
35+
release:
36+
if: github.event_name == 'release' && github.ref == 'refs/heads/master'
37+
runs-on: ubuntu-latest
38+
needs: build
39+
steps:
40+
- uses: actions/checkout@v2
41+
- name: Set up JDK 1.8
42+
uses: actions/setup-java@v1
43+
with:
44+
java-version: 1.8
45+
- name: Grant execute permission for gradlew
46+
run: chmod +x gradlew
47+
- name: Execute jacocoTestReport
48+
run: ./gradlew test jacocoTestReport && cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed"
49+
- name: Build with Gradle
50+
run: ./gradlew build --refresh-dependencies --no-daemon --continue
51+
- name: Push codeCoverage to Codecov
52+
run: bash <(curl -s https://codecov.io/bash)
53+
- name: Echo credentials
54+
run: echo "bintrayUser=${{secrets.BINTRAY_USER}}\nbintrayApiKey=${{secrets.BINTRAY_KEY}}" >> gradle.properties
55+
- name: Publish plugin
56+
run: ./gradlew bintrayUpload

0 commit comments

Comments
 (0)