Skip to content

Commit 71a9b04

Browse files
committed
add github workflow
1 parent c45792e commit 71a9b04

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/build.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Java CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Set up JDK 11
12+
uses: actions/setup-java@v2
13+
with:
14+
java-version: '11'
15+
distribution: 'adopt'
16+
- name: Cache Gradle packages
17+
uses: actions/cache@v2
18+
with:
19+
path: |
20+
~/.gradle/caches
21+
~/.gradle/wrapper
22+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
23+
restore-keys: |
24+
${{ runner.os }}-gradle-
25+
- name: Build with Gradle
26+
run: ./gradlew build
27+
- name: Cleanup Gradle Cache
28+
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
29+
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
30+
run: |
31+
rm -f ~/.gradle/caches/modules-2/modules-2.lock
32+
rm -f ~/.gradle/caches/modules-2/gc.properties
33+
- uses: actions/upload-artifact@v2
34+
with:
35+
name: intellibot
36+
path: build/libs/intellibt.jar

0 commit comments

Comments
 (0)