forked from unnamed/creative-central
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 1.19 KB
/
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'
on: [ 'pull_request', 'push' ]
jobs:
build:
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: 'ubuntu-latest'
steps:
- name: 'checkout repo'
uses: 'actions/checkout@v2'
- name: 'setup JDK'
uses: 'actions/setup-java@v1'
with:
java-version: 17
- name: 'build'
run: './gradlew shadowJar'
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'build.gradle.kts') }}
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew build
timeout-minutes: 10
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: creative-central
path: ${{ github.workspace }}/build/libs