Build Open Meteo binding #6
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
name: Build Open Meteo binding | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [ '17' ] | |
maven: [ '3.9.4' ] | |
os: [ 'ubuntu-22.04' ] | |
addons-ref: [ '4.1.x', 'main' ] | |
name: Build on ${{ matrix.addons-ref }} (Java ${{ matrix.java }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout openhab-addons | |
uses: actions/checkout@v4 | |
with: | |
repository: openhab/openhab-addons | |
path: openhab-addons | |
ref: ${{ matrix.addons-ref }} | |
- name: Checkout addon | |
uses: actions/checkout@v4 | |
with: | |
path: openhab-addons/bundles/com.obones.binding.openmeteo | |
- name: Set up Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.m2/repository | |
!~/.m2/repository/org/openhab | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Set up Java ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
- name: Set up Maven ${{ matrix.maven }} | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: ${{ matrix.maven }} | |
- name: Build with maven | |
run: 'cd openhab-addons/bundles/com.obones.binding.openmeteo ; mvn clean install -DskipChecks' | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: com.obones.binding.openmeteo-openhab_${{ matrix.addons-ref }}-java_${{ matrix.java }} | |
path: | | |
openhab-addons/bundles/com.obones.binding.openmeteo/target/com.obones.binding.openmeteo*.jar | |
!openhab-addons/bundles/com.obones.binding.openmeteo/target/com.obones.binding.openmeteo*-sources.jar | |