Skip to content

Commit 9c13819

Browse files
authored
Create ci-tests.yml
1 parent cf6c26b commit 9c13819

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/ci-tests.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Gradle Tests (CI)
2+
3+
on: push
4+
5+
jobs:
6+
vars:
7+
name: Get Variables
8+
runs-on: ubuntu-latest
9+
outputs:
10+
release_type: ${{steps.cf_release_type.outputs.value }}
11+
mod_version: ${{steps.mod_version.outputs.value }}
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Release Type
17+
id: cf_release_type
18+
uses: christian-draeger/[email protected]
19+
with:
20+
path: './gradle.properties'
21+
property: 'cf_release_type'
22+
23+
- name: Mod Version
24+
id: mod_version
25+
uses: christian-draeger/[email protected]
26+
with:
27+
path: './gradle.properties'
28+
property: 'mod_version'
29+
30+
jar:
31+
name: Publish JAR
32+
runs-on: ubuntu-latest
33+
needs: [vars]
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v2
37+
38+
- name: Set up JDK 1.8
39+
uses: actions/setup-java@v1
40+
with:
41+
java-version: 1.8
42+
43+
- name: Cache Gradle packages
44+
uses: actions/cache@v2
45+
with:
46+
path: ~/.gradle/caches
47+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
48+
restore-keys: ${{ runner.os }}-gradle
49+
50+
- name: Grant execute permission for gradlew
51+
run: chmod +x gradlew
52+
53+
- name: Test JAR with Gradle
54+
run: ./gradlew test
55+
# run: ./gradlew publish
56+
env:
57+
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)