Skip to content

Commit 31e84fd

Browse files
Create build-verification.yml
1 parent a859b91 commit 31e84fd

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build Verification
2+
# Trigger on pull requests and pushes
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- poc/maven_publish
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
name: Build and Test
13+
runs-on: macOS-latest
14+
15+
steps:
16+
# Step 1: Check out code
17+
- name: Check out code
18+
uses: actions/checkout@v4
19+
20+
# Step 2: List directory contents for debugging
21+
- name: List directory contents
22+
run: ls -alh
23+
24+
# Step 3: Set up JDK 21
25+
- name: Set up JDK 21
26+
uses: actions/setup-java@v4
27+
with:
28+
distribution: 'zulu'
29+
java-version: 21
30+
31+
# Step 4: Verify JDK installation (optional for debugging)
32+
- name: Verify JDK version
33+
run: java -version
34+
35+
# Step 5: Build the project
36+
- name: Build KMM library
37+
run: ./gradlew build
38+
39+
# Step 6: Run tests
40+
- name: Run tests
41+
run: ./gradlew test
42+
43+
# Step 7: Verify publication setup (optional)
44+
- name: Verify publication setup
45+
run: ./gradlew publishToMavenLocal --no-configuration-cache
46+
env:
47+
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
48+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
49+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }}
50+
51+
# Optional: Check the output of the build process
52+
# - name: Check Gradle output
53+
# run: tail -n 20 build.gradle

0 commit comments

Comments
 (0)