-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (40 loc) · 1.03 KB
/
main.yaml
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
41
42
43
44
45
46
name: main
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- uses: actions/setup-java@v1
with:
java-version: '11.0.9'
java-package: jdk
architecture: x64
- run: ./bin/build.sh
- name: Archive reports
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: reports
path: ./app/build/reports/**
- name: Archive libs
uses: actions/upload-artifact@v2
with:
name: libs
path: ./app/build/libs/**
if-no-files-found: error
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
if: ${{ failure() }}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: 'BUILD FAILURE'