Feature/update 2025 #52
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Java CI with Maven | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master, develop ] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: maven | |
- name: Package maven project | |
run: mvn --batch-mode --update-snapshots -Dspotless.check.skip=true -DskipChecks install | |
- name: Upload Maven build artifact (JAR) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-jar | |
path: bundles/org.openhab.binding.ebus/target/*.jar | |
- name: Remove classes folder to not include it into KAR | |
run: rm -rfv bundles/org.openhab.binding.ebus/target/classes | |
- name: Build Karaf KAR file embedded with all dependencies | |
run: mvn --batch-mode -Dspotless.check.skip=true -DskipChecks karaf:kar -pl :org.openhab.binding.ebus | |
- name: Upload Maven build artifact (KAR) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-kar | |
path: bundles/org.openhab.binding.ebus/target/*.kar |