-
Notifications
You must be signed in to change notification settings - Fork 11
33 lines (31 loc) · 959 Bytes
/
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
name: Build and Publish
on:
pull_request:
push:
branches:
- main
jobs:
build-and-publish:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
cache: gradle
- name: spotless
run: ./gradlew --no-daemon --parallel clean spotlessCheck
- name: Build with Gradle
run: ./gradlew build
- name: Publish to Artifactory
uses: gradle/gradle-build-action@v2
if: contains('refs/heads/release-', github.ref) || github.ref == 'refs/heads/main'
env:
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER}}
ARTIFACTORY_KEY: ${{ secrets.BESU_ARTIFACTORY }}
with:
arguments: --no-daemon --parallel publish artifactoryPublish --scan