Skip to content

Commit cf198f4

Browse files
committed
Use common tools for workflows
1 parent f0cd342 commit cf198f4

File tree

2 files changed

+10
-58
lines changed

2 files changed

+10
-58
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
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-
41
name: Build
52
on:
63
push:
74
branches:
85
- master
96
paths:
107
- 'gradle/**'
11-
- 'library/**'
12-
- 'example-bot/**'
8+
- 'src/**'
139
- 'build.gradle.kts'
1410
- 'settings.gradle.kts'
1511
- 'gradlew'
@@ -18,27 +14,7 @@ on:
1814

1915
jobs:
2016
build:
21-
runs-on: ubuntu-latest
22-
if: "!contains(github.event.commits[0].message, '[no-build]')"
23-
steps:
24-
- uses: "actions/[email protected]"
25-
- uses: "gradle/[email protected]"
26-
- name: Set up JDK
27-
uses: "actions/[email protected]"
28-
with:
29-
distribution: temurin
30-
java-version: 19
31-
cache: gradle
32-
- name: Grant execute permission for gradlew
33-
run: chmod +x gradlew
34-
- name: Test with Gradle
35-
run: ./gradlew test
36-
- name: Build jar with Gradle
37-
run: ./gradlew build
38-
- name: Upload artifacts
39-
uses: "actions/[email protected]"
40-
with:
41-
name: Lazy Library
42-
path: |
43-
library/build/libs/*.jar
44-
example-bot/build/libs/*.jar
17+
uses: srnyx/tools/.github/workflows/build.yml@main
18+
with:
19+
name: Lazy Library
20+
java: 20

.github/workflows/build_pr.yml

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
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-
41
name: Build [PR]
52
on:
63
pull_request:
74
paths:
85
- 'gradle/**'
9-
- 'library/**'
10-
- 'example-bot/**'
6+
- 'src/**'
117
- 'build.gradle.kts'
128
- 'settings.gradle.kts'
139
- 'gradlew'
@@ -16,27 +12,7 @@ on:
1612

1713
jobs:
1814
build:
19-
runs-on: ubuntu-latest
20-
if: "!contains(github.event.commits[0].message, '[no-build]')"
21-
steps:
22-
- uses: "actions/[email protected]"
23-
- uses: "gradle/[email protected]"
24-
- name: Set up JDK
25-
uses: "actions/[email protected]"
26-
with:
27-
distribution: temurin
28-
java-version: 19
29-
cache: gradle
30-
- name: Grant execute permission for gradlew
31-
run: chmod +x gradlew
32-
- name: Test with Gradle
33-
run: ./gradlew test
34-
- name: Build jar with Gradle
35-
run: ./gradlew build
36-
- name: Upload artifacts
37-
uses: "actions/[email protected]"
38-
with:
39-
name: Lazy Library
40-
path: |
41-
library/build/libs/*.jar
42-
example-bot/build/libs/*.jar
15+
uses: srnyx/tools/.github/workflows/build.yml@main
16+
with:
17+
name: Lazy Library
18+
java: 20

0 commit comments

Comments
 (0)