-
Notifications
You must be signed in to change notification settings - Fork 20
40 lines (38 loc) · 1.06 KB
/
build-2.x.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
name: CI
on:
push:
branches: [2.x]
pull_request:
branches: [2.x]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
path: build_dir
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
check-latest: true
- name: Gradle Build
run: |
cd $GITHUB_WORKSPACE/build_dir
./gradlew --stacktrace build
- name: Gradle Docs
run: |
cd $GITHUB_WORKSPACE/build_dir
./gradlew --stacktrace docs
- name: Codecov report
run: |
cd $GITHUB_WORKSPACE/build_dir
./gradlew codeCoverageReport
- name: Codecov
uses: codecov/codecov-action@v1
- name: Upload Archives
run: |
cd $GITHUB_WORKSPACE/build_dir
./gradlew uploadArchives -PossrhUsername='${{ secrets.SONATYPE_USERNAME }}' -PossrhPassword='${{ secrets.SONATYPE_PASSWORD}}'
if: steps.extract_branch.outputs.branch == 'main'