Skip to content

Commit 2f5fcdb

Browse files
committed
Add CI GH action workflow
1 parent 01592ff commit 2f5fcdb

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI/CD build
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
name: Build branch
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout source code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up JDK 17
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '17'
19+
distribution: 'temurin'
20+
cache: 'maven'
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '20'
26+
27+
- name: Build with Maven and deploy to Sonatype snapshot repository
28+
env:
29+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
30+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
31+
run: |
32+
mvn -Pjavadoc -Prelease --batch-mode --update-snapshots deploy
33+
34+
- name: Generate Java docs
35+
run: mvn -Pjavadoc -B javadoc:aggregate
36+
37+
- name: Capture project version
38+
run: echo PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout) >> $GITHUB_ENV

0 commit comments

Comments
 (0)