Added OH4 support #248
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
name: 'CI Build' | |
env: | |
BUILD_NUMBER: '1970.1.1' | |
BuildDirectory: '${{github.workspace}}\build' | |
ACTIONS_RUNNER_DEBUG: true | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: 'Build openHAB Windows App' | |
runs-on: windows-latest | |
steps: | |
- name: Checkout main code | |
uses: actions/checkout@v2 | |
with: | |
path: repo | |
clean: true | |
- name: Setup NuGet.exe for use with actions | |
uses: NuGet/setup-nuget@v1.0.5 | |
with: | |
nuget-version: 'latest' | |
- name: setup-msbuild | |
uses: microsoft/setup-msbuild@v1 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v3 | |
with: | |
path: ~\sonar\cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache SonarCloud scanner | |
id: cache-sonar-scanner | |
uses: actions/cache@v3 | |
with: | |
path: .\.sonar\scanner | |
key: ${{ runner.os }}-sonar-scanner | |
restore-keys: ${{ runner.os }}-sonar-scanner | |
- name: Install SonarCloud scanner | |
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' | |
shell: powershell | |
run: | | |
New-Item -Path .\.sonar\scanner -ItemType Directory | |
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner | |
- name: Begin SonarQube analyze | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}} | |
shell: pwsh | |
run: | | |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"openhab_openhab-windows" /o:"openhab" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" | |
- name: Build App | |
id: create_app_package | |
uses: ./repo/.github/workflows/actions/app-build | |
with: | |
build_configuration: 'debug' | |
output_directory: '${{env.BuildDirectory}}' | |
bundle_Platforms: 'x86' | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}} | |
- name: End SonarQube analyze | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}} | |
shell: pwsh | |
run: | | |
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" |