Add CI GH action workflow
This commit is contained in:
parent
01592fff45
commit
2f5fcdbcbe
1 changed files with 38 additions and 0 deletions
38
.github/workflows/continuous-integration.yml
vendored
Normal file
38
.github/workflows/continuous-integration.yml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
name: CI/CD build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build branch
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: 'maven'
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Build with Maven and deploy to Sonatype snapshot repository
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
||||
run: |
|
||||
mvn -Pjavadoc -Prelease --batch-mode --update-snapshots deploy
|
||||
|
||||
- name: Generate Java docs
|
||||
run: mvn -Pjavadoc -B javadoc:aggregate
|
||||
|
||||
- name: Capture project version
|
||||
run: echo PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout) >> $GITHUB_ENV
|
||||
Loading…
Reference in a new issue