Skip to content

Commit 4e8190c

Browse files
authored
Create test-build.yml
1 parent 87026ed commit 4e8190c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/test-build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Test Build
5+
6+
on:
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
name: Gradle Build and Publish
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up JDK 1.8
17+
uses: actions/setup-java@v1
18+
with:
19+
java-version: 1.8
20+
- name: Cache Gradle packages
21+
uses: actions/cache@v2
22+
with:
23+
path: ~/.gradle/caches
24+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
25+
restore-keys: ${{ runner.os }}-gradle
26+
- name: Grant execute permission for gradlew
27+
run: chmod +x gradlew
28+
- name: Build with Gradle
29+
run: ./gradlew publish
30+
env:
31+
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
- name: Add Artifact
34+
uses: actions/upload-artifact@v2
35+
with:
36+
name: libs
37+
path: build/libs/*.jar

0 commit comments

Comments
 (0)