-
Notifications
You must be signed in to change notification settings - Fork 13
36 lines (32 loc) · 1.01 KB
/
pipeline-build.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
name: build-action
on:
push:
branches-ignore:
- 'gh-pages'
pull_request:
branches-ignore:
- 'gh-pages'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- name: Check repository
uses: actions/checkout@v3
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
#Run only on macOS
- name: Setup Docker
if: ${{ matrix.os == 'macos-latest' && github.event_name == 'pull_request' }}
uses: docker-practice/actions-setup-docker@master
#Build without test on Windows or macOS (when not a PR)
- name: Gradle build
run: |
if [[ "$RUNNER_OS" == "Windows" || ( "$RUNNER_OS" == "macOS" && ${{ github.event_name }} != 'pull_request' ) ]]; then
./gradlew build -x test
else
./gradlew build
fi
shell: bash