Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 8 version 4 release #958

Merged
merged 24 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7ee73ec
Change read me to reflect the .NET 8 changes
helto4real Oct 21, 2023
0080336
Added new dotnet 8 dep
helto4real Oct 21, 2023
1ea58de
add .net pre-release versions of microsoft nugets
helto4real Oct 21, 2023
fd3b3f7
add .net 8 to ci
helto4real Oct 21, 2023
73a73f4
updated containers using new container base and new S6 v3
helto4real Oct 22, 2023
c158c77
latest qemu action version
helto4real Oct 22, 2023
72f9707
use amd image for the build part
helto4real Oct 22, 2023
210df6f
addon docker fixes
helto4real Oct 22, 2023
9a9a150
update some dependencies
helto4real Oct 22, 2023
8a2b72f
Fix support for pre-release
helto4real Oct 22, 2023
10cd1f0
.net 8 needed for making the nugets
helto4real Oct 22, 2023
3d82cfe
remove and merge from dev
helto4real Oct 22, 2023
6b2bc5e
The script now uploads to nuget
helto4real Oct 22, 2023
d6a8bcb
do version 4 in name...
helto4real Oct 23, 2023
41075c0
Fix add-on container
helto4real Oct 23, 2023
feffd8c
Move dynamic compile to NetDaemon.AppModel.SourceDeployedApps.csproj …
FrankBakkerNl Oct 24, 2023
bdc0c15
testing source deploy
helto4real Oct 24, 2023
023d9b7
Cleand up project files
FrankBakkerNl Oct 26, 2023
9f80262
changed the GH action to match the new V4 runtime
helto4real Oct 27, 2023
3479e1d
make sure linux line endings for docker files
helto4real Oct 28, 2023
c23c0db
removed auto
helto4real Oct 28, 2023
dd98ac7
force text
helto4real Oct 28, 2023
c5d971d
Move commonly used values for properties to the Directory.Build.props…
Barsonax Oct 28, 2023
25460d7
Refactors (#979)
helto4real Oct 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,12 @@ dotnet_diagnostic.CA1034.severity = none
#Static holder types should be Static or NotInheritable
dotnet_diagnostic.CA1052.severity = none
#Do not raise reserved exception types
dotnet_diagnostic.CA2201.severity = none
dotnet_diagnostic.CA2201.severity = none

dotnet_diagnostic.CA1854.severity = none
#The enum member 'Itself' has the same constant value
dotnet_diagnostic.CA1069.severity = none
#Do not create task without passing TaskScheduler
dotnet_diagnostic.CA2008.severity = none
#Use concrete types
dotnet_diagnostic.CA1859.severity = none
1 change: 1 addition & 0 deletions .github/workflows/ci_analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- dev
- dotnet8
jobs:
sonarscanner:
name: 🔍 SonarScanner
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
branches:
- main
- dev
- dotnet8
pull_request:
branches:
- main
- dev
- dotnet8
schedule:
- cron: "0 2 * * *" # run at 2 AM UTC
jobs:
Expand All @@ -20,11 +22,11 @@ jobs:
- name: 📤 Checkout the repository
uses: actions/checkout@main

- name: 🥅 Install .Net 7
uses: actions/setup-dotnet@v1
- name: 🥅 Install .Net 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x" # SDK Version

dotnet-version: '8.0.x'
dotnet-quality: 'preview'
- name: 🔍 Enable problem matchers
run: echo "::add-matcher::.github/matchers/dotnet.json"

Expand All @@ -39,7 +41,7 @@ jobs:
dotnet test -v minimal --no-build --configuration Release --logger GitHubActions '/p:CollectCoverage=true;CoverletOutputFormat="json,lcov,cobertura";MergeWith=${{github.workspace}}/codecover.json;CoverletOutput=${{github.workspace}}/codecover' src/Client/NetDaemon.HassClient.Tests -- RunConfiguration.CollectSourceInformation=true
dotnet test -v minimal --no-build --configuration Release --logger GitHubActions '/p:CollectCoverage=true;CoverletOutputFormat="json,lcov,cobertura";MergeWith=${{github.workspace}}/codecover.json;CoverletOutput=${{github.workspace}}/codecover' src/AppModel/NetDaemon.AppModel.Tests -- RunConfiguration.CollectSourceInformation=true
dotnet test -v minimal --no-build --configuration Release --logger GitHubActions '/p:CollectCoverage=true;CoverletOutputFormat="json,lcov,cobertura";MergeWith=${{github.workspace}}/codecover.json;CoverletOutput=${{github.workspace}}/codecover' src/Runtime/NetDaemon.Runtime.Tests -- RunConfiguration.CollectSourceInformation=true

- name: 👀 Integration Tests
run: |
echo "## ❔ Integration test results" >> $GITHUB_STEP_SUMMARY
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/push_docker_addon_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
sed -i '/ private const string Version = /c\ private const string Version = "feature build";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="feature" \\' ${{github.workspace}}/Dockerfile.AddOn
- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

Expand All @@ -47,5 +47,5 @@ jobs:
--no-cache \
--file ./Dockerfile.AddOn . \
--compress \
--tag "netdaemon/netdaemon_addon3_1:feature-${{ github.event.inputs.tag }}" \
--tag "ghcr.io/netdaemon_addon3_1:feature-${{ github.event.inputs.tag }}"
--tag "netdaemon/netdaemon_addon4:feature-${{ github.event.inputs.tag }}" \
--tag "ghcr.io/netdaemon_addon4:feature-${{ github.event.inputs.tag }}"
16 changes: 8 additions & 8 deletions .github/workflows/push_docker_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
sed -i '/ private const string Version = /c\ private const string Version = "dev";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="dev"' ${{github.workspace}}/Dockerfile.AddOn
- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

Expand All @@ -47,8 +47,8 @@ jobs:
--no-cache \
--file ./Dockerfile.AddOn . \
--compress \
--tag netdaemon/netdaemon_addon3:dev \
--tag ghcr.io/net-daemon/netdaemon_addon3:dev
--tag netdaemon/netdaemon_addon4:dev \
--tag ghcr.io/net-daemon/netdaemon_addon4:dev

deploy_docker_dev:
name: 📦 Deploy to Docker dev
Expand All @@ -63,10 +63,10 @@ jobs:
sed -i '/ private const string Version = /c\ private const string Version = "dev";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="dev"' ${{github.workspace}}/Dockerfile.AddOn
- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

Expand All @@ -91,5 +91,5 @@ jobs:
--no-cache \
--file ./Dockerfile . \
--compress \
--tag netdaemon/netdaemon3:dev \
--tag ghcr.io/net-daemon/netdaemon3:dev
--tag netdaemon/netdaemon4:dev \
--tag ghcr.io/net-daemon/netdaemon4:dev
16 changes: 8 additions & 8 deletions .github/workflows/push_docker_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
sed -i '/ private const string Version = /c\ private const string Version = "feature-${{ github.event.inputs.tag }}";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="feature-${{ github.event.inputs.tag }}"' ${{github.workspace}}/Dockerfile.AddOn
- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

Expand All @@ -48,8 +48,8 @@ jobs:
--no-cache \
--file ./Dockerfile . \
--compress \
--tag "netdaemon/netdaemon3_1:feature-${{ github.event.inputs.tag }}" \
--tag "ghcr.io/net-daemon/netdaemon3_1:feature-${{ github.event.inputs.tag }}"
--tag "netdaemon/netdaemon4:feature-${{ github.event.inputs.tag }}" \
--tag "ghcr.io/net-daemon/netdaemon4:feature-${{ github.event.inputs.tag }}"
deploy_docker_addon:
name: 📦 Deploy to Docker add-on with tag
runs-on: ubuntu-latest
Expand All @@ -63,10 +63,10 @@ jobs:
sed -i '/ private const string Version = /c\ private const string Version = "feature-${{ github.event.inputs.tag }}";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="feature-${{ github.event.inputs.tag }}"' ${{github.workspace}}/Dockerfile.AddOn
- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

Expand All @@ -89,5 +89,5 @@ jobs:
--no-cache \
--file ./Dockerfile.AddOn . \
--compress \
--tag "netdaemon/netdaemon_addon3:feature-${{ github.event.inputs.tag }}" \
--tag "ghcr.io/net-daemon/netdaemon_addon3:feature-${{ github.event.inputs.tag }}"
--tag "netdaemon/netdaemon_addon4:feature-${{ github.event.inputs.tag }}" \
--tag "ghcr.io/net-daemon/netdaemon_addon4:feature-${{ github.event.inputs.tag }}"
14 changes: 7 additions & 7 deletions .github/workflows/push_docker_prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- rc
jobs:
deploy_docker:
name: 📦 Deploy to Docker with tag
name: 📦 Deploy pre-release to Docker with tag
runs-on: ubuntu-latest
environment: CI - release environment
steps:
Expand Down Expand Up @@ -52,8 +52,8 @@ jobs:
--no-cache \
--file ./Dockerfile . \
--compress \
--tag "netdaemon/netdaemon:${{ github.event.inputs.pre }}" \
--tag "ghcr.io/net-daemon/netdaemon:${{ github.event.inputs.pre }}"
--tag "netdaemon/netdaemon4:${{ github.event.inputs.pre }}" \
--tag "ghcr.io/net-daemon/netdaemon4:${{ github.event.inputs.pre }}"
deploy_docker_addon:
name: 📦 Deploy to Docker add-on with tag
runs-on: ubuntu-latest
Expand All @@ -67,10 +67,10 @@ jobs:
sed -i '/ private const string Version = /c\ private const string Version = "feature-${{ github.event.inputs.pre }}";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="feature-${{ github.event.inputs.pre }}"' ${{github.workspace}}/Dockerfile.AddOn
- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

Expand All @@ -93,5 +93,5 @@ jobs:
--no-cache \
--file ./Dockerfile.AddOn . \
--compress \
--tag "netdaemon/netdaemon_addon:${{ github.event.inputs.pre }}" \
--tag "ghcr.io/net-daemon/netdaemon_addon:${{ github.event.inputs.pre }}"
--tag "netdaemon/netdaemon_addon4:${{ github.event.inputs.pre }}" \
--tag "ghcr.io/net-daemon/netdaemon_addon4:${{ github.event.inputs.pre }}"
26 changes: 4 additions & 22 deletions .github/workflows/push_nuget_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,15 @@ jobs:
echo Current version: $latest
echo "::set-output name=version::$latest"

- name: 🥅 Install .Net 7
- name: 🥅 Install .Net 8
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x" # SDK Version
dotnet-version: "8.0.x" # SDK Version

- name: 🔖 Set version number
run: |
sed -i "/ private const string Version = /c\ private const string Version = \"${{ github.event.inputs.tag }}\";" ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
- name: 🎁 Pack AppModel
run: dotnet pack src/AppModel/NetDaemon.AppModel/NetDaemon.AppModel.csproj --configuration Release -p:PackageVersion=${{ github.event.inputs.tag }} -p:Version=${{ github.event.inputs.tag }}
- name: 🎁 Pack Client
run: dotnet pack src/Client/NetDaemon.HassClient/NetDaemon.Client.csproj --configuration Release -p:PackageVersion=${{ github.event.inputs.tag }} -p:Version=${{ github.event.inputs.tag }}
- name: 🎁 Pack Runtime
run: dotnet pack src/Runtime/NetDaemon.Runtime/NetDaemon.Runtime.csproj --configuration Release -p:PackageVersion=${{ github.event.inputs.tag }} -p:Version=${{ github.event.inputs.tag }}
- name: 🎁 Pack HassModel
run: dotnet pack src/HassModel/NetDeamon.HassModel/NetDaemon.HassModel.csproj --configuration Release -p:PackageVersion=${{ github.event.inputs.tag }} -p:Version=${{ github.event.inputs.tag }}
- name: 🎁 Pack HassModel integration
run: dotnet pack src/HassModel/NetDaemon.HassModel.Integration/NetDaemon.HassModel.Integration.csproj --configuration Release -p:PackageVersion=${{ github.event.inputs.tag }} -p:Version=${{ github.event.inputs.tag }}
- name: 🎁 Pack HassModel codegen
run: dotnet pack src/HassModel/NetDaemon.HassModel.CodeGenerator/NetDaemon.HassModel.CodeGenerator.csproj --configuration Release -p:PackageVersion=${{ github.event.inputs.tag }} -p:Version=${{ github.event.inputs.tag }}
- name: 🎁 Pack scheduling extensions
run: dotnet pack src/Extensions/NetDaemon.Extensions.Scheduling/NetDaemon.Extensions.Scheduling.csproj --configuration Release -p:PackageVersion=${{ github.event.inputs.tag }} -p:Version=${{ github.event.inputs.tag }}
- name: 🎁 Pack logging extensions
run: dotnet pack src/Extensions/NetDaemon.Extensions.Logging/NetDaemon.Extensions.Logging.csproj --configuration Release -p:PackageVersion=${{ github.event.inputs.tag }} -p:Version=${{ github.event.inputs.tag }}
- name: 🎁 Pack TTS extensions
run: dotnet pack src/Extensions/NetDaemon.Extensions.Tts/NetDaemon.Extensions.Tts.csproj --configuration Release -p:PackageVersion=${{ github.event.inputs.tag }} -p:Version=${{ github.event.inputs.tag }}
- name: 🎁 Pack Mqtt extensions
run: dotnet pack src/Extensions/NetDaemon.Extensions.MqttEntityManager/NetDaemon.Extensions.MqttEntityManager.csproj --configuration Release -p:PackageVersion=${{ github.event.inputs.tag }} -p:Version=${{ github.event.inputs.tag }}
- name: 🎁 Pack
run: dotnet pack NetDaemon.sln --configuration Release -p:PackageVersion=${{ github.event.inputs.tag }} -p:Version=${{ github.event.inputs.tag }}
- name: 📨 Push to nuget
run: dotnet nuget push **/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
6 changes: 3 additions & 3 deletions .github/workflows/push_nuget_prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- rc
jobs:
deploy_nuget:
name: 📦 publish nuget packages manual version
name: 📦 publish nuget pre-release packages manual version
runs-on: ubuntu-latest
environment: CI - release environment
steps:
Expand All @@ -43,5 +43,5 @@ jobs:
sed -i "/ private const string Version = /c\ private const string Version = \"${{ github.event.inputs.tag }}\";" ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
- name: 🎁 Pack
run: dotnet pack NetDaemon.sln --configuration Release -p:PackageVersion=${{ github.event.inputs.tag }}-${{ github.event.inputs.pre }} -p:Version=${{ github.event.inputs.tag }}-${{ github.event.inputs.pre }}
#- name: 📨 Push to nuget
#run: dotnet nuget push **/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
- name: 📨 Push to nuget
run: dotnet nuget push **/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
24 changes: 12 additions & 12 deletions .github/workflows/tags_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
sed -i '/ private const string Version = /c\ private const string Version = "${{ steps.version.outputs.version }}";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="${{ steps.version.outputs.version }}"' ${{github.workspace}}/Dockerfile.AddOn
- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

Expand All @@ -54,10 +54,10 @@ jobs:
--no-cache \
--file ./Dockerfile.AddOn . \
--compress \
--tag netdaemon/netdaemon_addon3_1:${{ steps.version.outputs.version }} \
--tag netdaemon/netdaemon_addon3_1:latest \
--tag ghcr.io/net-daemon/netdaemon_addon3_1:${{ steps.version.outputs.version }} \
--tag ghcr.io/net-daemon/netdaemon_addon3_1:latest
--tag netdaemon/netdaemon_addon4:${{ steps.version.outputs.version }} \
--tag netdaemon/netdaemon_addon4:latest \
--tag ghcr.io/net-daemon/netdaemon_addon4:${{ steps.version.outputs.version }} \
--tag ghcr.io/net-daemon/netdaemon_addon4:latest

deploy_docker:
name: 📦 Deploy to Docker Hub
Expand All @@ -83,10 +83,10 @@ jobs:
sed -i '/ io.hass.version=/c\ io.hass.version="${{ steps.version.outputs.version }}"' ${{github.workspace}}/Dockerfile.AddOn

- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: 🔓 Login to Docker hub
Expand All @@ -108,7 +108,7 @@ jobs:
--no-cache \
--file ./Dockerfile . \
--compress \
--tag netdaemon/netdaemon3_1:latest \
--tag netdaemon/netdaemon3_1:${{ steps.version.outputs.version }} \
--tag ghcr.io/net-daemon/netdaemon3_1:${{ steps.version.outputs.version }} \
--tag ghcr.io/net-daemon/netdaemon3_1:latest
--tag netdaemon/netdaemon4:latest \
--tag netdaemon/netdaemon4:${{ steps.version.outputs.version }} \
--tag ghcr.io/net-daemon/netdaemon4:${{ steps.version.outputs.version }} \
--tag ghcr.io/net-daemon/netdaemon4:latest
Loading
Loading