Skip to content

Commit b0638a1

Browse files
authored
add gradle-build actions
1 parent 42d4632 commit b0638a1

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/gradle-build.yml

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

0 commit comments

Comments
 (0)