-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (38 loc) · 1.33 KB
/
Main.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
name: Java Main Build
on:
push:
branches:
- main
pull_request: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0 # need full history for reckon (tags)
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4
- name: Build & Test
# https://github.com/burrunan/gradle-cache-action
uses: burrunan/gradle-cache-action@a54b6ce2cbbba932e5d142129dddef103e6ad143
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Building & Testing the examples project so that we can do everything in 1 build
build-root-directory: examples
arguments: :plugin:assemble :plugin:check assemble check --continue --stacktrace
- name: Publish Snapshot (on main)
if: github.ref == 'refs/heads/main'
uses: burrunan/gradle-cache-action@a54b6ce2cbbba932e5d142129dddef103e6ad143
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
build-root-directory: plugin
arguments: publish --continue --stacktrace
execution-only-caches: true