Skip to content

Commit 4e72edb

Browse files
authored
Merge pull request #2 from LuminiaDev/feature/actions
feat: added build action
2 parents 7781c08 + 79c3401 commit 4e72edb

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build Project
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up JDK
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: 'temurin'
23+
java-version: 17
24+
25+
- name: Grant permissions
26+
run: chmod +x ./gradlew
27+
28+
- name: Cache Gradle dependencies
29+
uses: actions/cache@v4
30+
with:
31+
path: |
32+
~/.gradle/caches
33+
~/.gradle/wrapper
34+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
35+
restore-keys: |
36+
${{ runner.os }}-gradle-
37+
38+
- name: Build with Gradle
39+
run: ./gradlew build
40+
41+
- name: Upload build artifacts
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: all-modules
45+
path: '**/build/libs/*.jar'

0 commit comments

Comments
 (0)