Skip to content

Commit 670908b

Browse files
committed
build: Add a build workflow
1 parent e57e47c commit 670908b

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,6 @@ ij_properties_align_group_field_declarations = false
105105
ij_properties_keep_blank_lines = false
106106
ij_properties_key_value_delimiter = equals
107107
ij_properties_spaces_around_key_value_delimiter = false
108+
109+
[{*.yml,*.yaml}]
110+
indent_size = 2

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and test
2+
3+
on:
4+
push:
5+
pull_request:
6+
types:
7+
- opened
8+
- reopened
9+
- synchronize
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Setup Java 21
21+
uses: actions/setup-java@v4
22+
with:
23+
java-version: '21'
24+
distribution: 'temurin'
25+
26+
- name: Setup Gradle
27+
uses: gradle/actions/setup-gradle@v4
28+
29+
- name: Build and test with Gradle
30+
run: ./gradlew build --no-daemon --console=plain --stacktrace
31+
32+
- name: Upload JAR artifacts
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: build-jars
36+
path: build/libs/*.jar

build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
plugins {
2+
base
3+
}
4+
5+
val copyArtifactsTask = tasks.register<Copy>("copyArtifacts") {
6+
from(subprojects.flatMap { it.tasks.withType<Jar>() })
7+
into(layout.buildDirectory.dir("libs"))
8+
}
9+
10+
tasks.assemble {
11+
dependsOn(copyArtifactsTask)
12+
}

0 commit comments

Comments
 (0)