Skip to content

Commit

Permalink
Update nugets and .NET framework (7.0) (#64)
Browse files Browse the repository at this point in the history
* Update framework,. CI and nugets

* Update ci.yml

* Update nugets
  • Loading branch information
chkr1011 authored Apr 30, 2023
1 parent ece5fae commit 3f40b83
Show file tree
Hide file tree
Showing 144 changed files with 377 additions and 368 deletions.
117 changes: 59 additions & 58 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,160 +7,161 @@ on:
pull_request:

env:
VERSION: "1.6.0.${{github.run_number}}"
VERSION: "1.7.0.${{github.run_number}}"

jobs:
build:

runs-on: windows-2022
# windows-latest is required due to some resource stuff.
runs-on: windows-latest

steps:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1.9.0
with:
dotnet-version: '6.0.x'
dotnet-version: '7.0.x'

- name: Checkout Code
uses: actions/checkout@v2

- name: Install dependencies
run: dotnet restore Source/MQTTnetApp.sln
run: dotnet restore Source/mqttMultimeter.sln

# Build applications
- name: Build win-x86
run: dotnet publish Source/MQTTnetApp.csproj -r win-x86 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}
run: dotnet publish Source/mqttMultimeter.csproj -r win-x86 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}

- name: Zip win-x86 build
uses: vimtor/action-zip@v1
with:
files: Source/bin/Release/net6.0/win-x86/publish/
dest: MQTTnetApp-windows-X86.zip
files: Source/bin/Release/win-x86/publish/
dest: mqttMultimeter-windows-x86.zip

- name: Collect win-x86 artifacts
uses: actions/upload-artifact@v2
with:
name: MQTTnetApp-windows-x86
path: ${{ github.workspace }}/MQTTnetApp-windows-X86.zip
name: mqttMultimeter-windows-x86
path: ${{ github.workspace }}/mqttMultimeter-windows-x86.zip

- name: Build win-x64
run: dotnet publish Source/MQTTnetApp.csproj -r win-x64 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}
run: dotnet publish Source/mqttMultimeter.csproj -r win-x64 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}

- name: Zip win-x64 build
uses: vimtor/action-zip@v1
with:
files: Source/bin/Release/net6.0/win-x64/publish/
dest: MQTTnetApp-windows-X64.zip
files: Source/bin/Release/win-x64/publish/
dest: mqttMultimeter-windows-x64.zip

- name: Collect win-x64 artifacts
uses: actions/upload-artifact@v2
with:
name: MQTTnetApp-windows-x64
path: ${{ github.workspace }}/MQTTnetApp-windows-X64.zip
name: mqttMultimeter-windows-x64
path: ${{ github.workspace }}/mqttMultimeter-windows-x64.zip

- name: Build win-arm
run: dotnet publish Source/MQTTnetApp.csproj -r win-arm -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}
run: dotnet publish Source/mqttMultimeter.csproj -r win-arm -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}

- name: Zip win-arm build
uses: vimtor/action-zip@v1
with:
files: Source/bin/Release/net6.0/win-arm/publish/
dest: MQTTnetApp-windows-ARM.zip
files: Source/bin/Release/win-arm/publish/
dest: mqttMultimeter-windows-arm.zip

- name: Collect win-arm artifacts
uses: actions/upload-artifact@v2
with:
name: MQTTnetApp-windows-arm
path: ${{ github.workspace }}/MQTTnetApp-windows-ARM.zip
name: mqttMultimeter-windows-arm
path: ${{ github.workspace }}/mqttMultimeter-windows-arm.zip

- name: Build win-arm64
run: dotnet publish Source/MQTTnetApp.csproj -r win-arm64 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}
run: dotnet publish Source/mqttMultimeter.csproj -r win-arm64 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}

- name: Zip win-arm64 build
uses: vimtor/action-zip@v1
with:
files: Source/bin/Release/net6.0/win-arm64/publish/
dest: MQTTnetApp-windows-ARM64.zip
files: Source/bin/Release/win-arm64/publish/
dest: mqttMultimeter-windows-arm64.zip

- name: Collect win-arm64 artifacts
uses: actions/upload-artifact@v2
with:
name: MQTTnetApp-windows-arm64
path: ${{ github.workspace }}/MQTTnetApp-windows-ARM64.zip
name: mqttMultimeter-windows-arm64
path: ${{ github.workspace }}/mqttMultimeter-windows-arm64.zip

- name: Build osx-x64
run: dotnet publish Source/MQTTnetApp.csproj -r osx.12-x64 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}
run: dotnet publish Source/mqttMultimeter.csproj -r osx.12-x64 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}

- name: Zip osx-x64 build
uses: vimtor/action-zip@v1
with:
files: Source/bin/Release/net6.0/osx.12-x64/publish/
dest: MQTTnetApp-macOS-X64.zip
files: Source/bin/Release/osx.12-x64/publish/
dest: mqttMultimeter-macOS-x64.zip

- name: Collect osx-x64 artifacts
uses: actions/upload-artifact@v2
with:
name: MQTTnetApp-macOS-x64
path: ${{ github.workspace }}/MQTTnetApp-macOS-X64.zip
name: mqttMultimeter-macOS-x64
path: ${{ github.workspace }}/mqttMultimeter-macOS-x64.zip

- name: Build osx-arm64
run: dotnet publish Source/MQTTnetApp.csproj -r osx.12-arm64 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}
run: dotnet publish Source/mqttMultimeter.csproj -r osx.12-arm64 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}

- name: Zip osx-arm64 build
uses: vimtor/action-zip@v1
with:
files: Source/bin/Release/net6.0/osx.12-arm64/publish/
dest: MQTTnetApp-macOS-ARM64.zip
files: Source/bin/Release/osx.12-arm64/publish/
dest: mqttMultimeter-macOS-arm64.zip

- name: Collect osx-arm64 artifacts
uses: actions/upload-artifact@v2
with:
name: MQTTnetApp-macOS-arm64
path: ${{ github.workspace }}/MQTTnetApp-macOS-ARM64.zip
name: mqttMultimeter-macOS-arm64
path: ${{ github.workspace }}/mqttMultimeter-macOS-arm64.zip

- name: Build linux-x64
run: dotnet publish Source/MQTTnetApp.csproj -r linux-x64 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}
run: dotnet publish Source/mqttMultimeter.csproj -r linux-x64 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}

- name: Zip linux-x64 build
uses: vimtor/action-zip@v1
with:
files: Source/bin/Release/net6.0/linux-x64/publish/
dest: MQTTnetApp-linux-X64.zip
files: Source/bin/Release/linux-x64/publish/
dest: mqttMultimeter-linux-x64.zip

- name: Collect linux-x64 artifacts
uses: actions/upload-artifact@v2
with:
name: MQTTnetApp-linux-x64
path: ${{ github.workspace }}/MQTTnetApp-linux-X64.zip
name: mqttMultimeter-linux-x64
path: ${{ github.workspace }}/mqttMultimeter-linux-x64.zip

- name: Build linux-arm
run: dotnet publish Source/MQTTnetApp.csproj -r linux-arm -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}
run: dotnet publish Source/mqttMultimeter.csproj -r linux-arm -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}

- name: Zip linux-arm build
uses: vimtor/action-zip@v1
with:
files: Source/bin/Release/net6.0/linux-arm/publish/
dest: MQTTnetApp-linux-ARM.zip
files: Source/bin/Release/linux-arm/publish/
dest: mqttMultimeter-linux-arm.zip

- name: Collect linux-arm artifacts
uses: actions/upload-artifact@v2
with:
name: MQTTnetApp-linux-arm
path: ${{ github.workspace }}/MQTTnetApp-linux-ARM.zip
name: mqttMultimeter-linux-arm
path: ${{ github.workspace }}/mqttMultimeter-linux-arm.zip

- name: Build linux-arm64
run: dotnet publish Source/MQTTnetApp.csproj -r linux-arm64 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}
run: dotnet publish Source/mqttMultimeter.csproj -r linux-arm64 -p:Configuration=Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true -property:Version=${{ env.VERSION }}

- name: Zip linux-arm64 build
uses: vimtor/action-zip@v1
with:
files: Source/bin/Release/net6.0/linux-arm64/publish/
dest: MQTTnetApp-linux-ARM64.zip
files: Source/bin/Release/linux-arm64/publish/
dest: mqttMultimeter-linux-arm64.zip

- name: Collect linux-arm artifacts
uses: actions/upload-artifact@v2
with:
name: MQTTnetApp-linux-arm64
path: ${{ github.workspace }}/MQTTnetApp-linux-ARM64.zip
name: mqttMultimeter-linux-arm64
path: ${{ github.workspace }}/mqttMultimeter-linux-arm64.zip

# Release Management
- name: Delete release drafts
Expand All @@ -178,12 +179,12 @@ jobs:
tag_name: v${{ env.VERSION }}
generate_release_notes: true
files: |
${{ github.workspace }}/MQTTnetApp-windows-X86.zip
${{ github.workspace }}/MQTTnetApp-windows-X64.zip
${{ github.workspace }}/MQTTnetApp-windows-ARM.zip
${{ github.workspace }}/MQTTnetApp-windows-ARM64.zip
${{ github.workspace }}/MQTTnetApp-macOS-X64.zip
${{ github.workspace }}/MQTTnetApp-macOS-ARM64.zip
${{ github.workspace }}/MQTTnetApp-linux-X64.zip
${{ github.workspace }}/MQTTnetApp-linux-ARM.zip
${{ github.workspace }}/MQTTnetApp-linux-ARM64.zip
${{ github.workspace }}/mqttMultimeter-windows-x86.zip
${{ github.workspace }}/mqttMultimeter-windows-x64.zip
${{ github.workspace }}/mqttMultimeter-windows-arm.zip
${{ github.workspace }}/mqttMultimeter-windows-arm64.zip
${{ github.workspace }}/mqttMultimeter-macOS-x64.zip
${{ github.workspace }}/mqttMultimeter-macOS-arm64.zip
${{ github.workspace }}/mqttMultimeter-linux-x64.zip
${{ github.workspace }}/mqttMultimeter-linux-arm.zip
${{ github.workspace }}/mqttMultimeter-linux-arm64.zip
2 changes: 1 addition & 1 deletion Source/App.axaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Application x:Class="MQTTnetApp.App"
<Application x:Class="mqttMultimeter.App"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=System.Runtime">
Expand Down
34 changes: 17 additions & 17 deletions Source/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using Microsoft.Extensions.DependencyInjection;
using MQTTnetApp.Common;
using MQTTnetApp.Controls;
using MQTTnetApp.Main;
using MQTTnetApp.Pages.Connection;
using MQTTnetApp.Pages.Inflight;
using MQTTnetApp.Pages.Inflight.Export;
using MQTTnetApp.Pages.Info;
using MQTTnetApp.Pages.Log;
using MQTTnetApp.Pages.PacketInspector;
using MQTTnetApp.Pages.Publish;
using MQTTnetApp.Pages.Subscriptions;
using MQTTnetApp.Pages.TopicExplorer;
using MQTTnetApp.Services.Data;
using MQTTnetApp.Services.Mqtt;
using MQTTnetApp.Services.State;
using MQTTnetApp.Services.Updates;
using mqttMultimeter.Common;
using mqttMultimeter.Controls;
using mqttMultimeter.Main;
using mqttMultimeter.Pages.Connection;
using mqttMultimeter.Pages.Inflight;
using mqttMultimeter.Pages.Inflight.Export;
using mqttMultimeter.Pages.Info;
using mqttMultimeter.Pages.Log;
using mqttMultimeter.Pages.PacketInspector;
using mqttMultimeter.Pages.Publish;
using mqttMultimeter.Pages.Subscriptions;
using mqttMultimeter.Pages.TopicExplorer;
using mqttMultimeter.Services.Data;
using mqttMultimeter.Services.Mqtt;
using mqttMultimeter.Services.State;
using mqttMultimeter.Services.Updates;

namespace MQTTnetApp;
namespace mqttMultimeter;

public sealed class App : Application
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Common/BasePageViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using ReactiveUI;

namespace MQTTnetApp.Common;
namespace mqttMultimeter.Common;

public abstract class BasePageViewModel : BaseViewModel
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Common/BaseSingleSelectionViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using ReactiveUI;

namespace MQTTnetApp.Common;
namespace mqttMultimeter.Common;

public abstract class BaseSingleSelectionViewModel : BaseViewModel
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Common/BaseViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using ReactiveUI;

namespace MQTTnetApp.Common;
namespace mqttMultimeter.Common;

public abstract class BaseViewModel : ReactiveObject
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Common/CollectionViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Specialized;
using System.ComponentModel;

namespace MQTTnetApp.Common;
namespace mqttMultimeter.Common;

public sealed class CollectionViewModel<TItem> : ObservableCollection<TItem>
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Common/EnumViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using ReactiveUI;

namespace MQTTnetApp.Common;
namespace mqttMultimeter.Common;

public class EnumViewModel<TEnum> : BaseViewModel where TEnum : Enum
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Common/PageItemsViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.ObjectModel;
using ReactiveUI;

namespace MQTTnetApp.Common;
namespace mqttMultimeter.Common;

public sealed class PageItemsViewModel<TItem> : BaseViewModel
{
Expand Down
3 changes: 1 addition & 2 deletions Source/Common/ViewLocator.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Avalonia.Controls;
using Avalonia.Controls.Templates;

namespace MQTTnetApp.Common;
namespace mqttMultimeter.Common;

sealed class ViewLocator : IDataTemplate
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Controls/AutoGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Avalonia.Interactivity;
using Avalonia.Threading;

namespace MQTTnetApp.Controls;
namespace mqttMultimeter.Controls;

public sealed class AutoGrid : Grid
{
Expand Down
4 changes: 2 additions & 2 deletions Source/Controls/BufferEditor/BufferEditor.axaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:MQTTnetApp.Controls"
xmlns:avaloniaEdit="https://github.com/avaloniaui/avaloniaedit">
xmlns:avaloniaEdit="https://github.com/avaloniaui/avaloniaedit"
xmlns:controls="clr-namespace:mqttMultimeter.Controls">
<Design.PreviewWith>
<controls:BufferEditor Width="800"
Buffer="{x:Static controls:BufferPreviewTestData.PayloadString}"
Expand Down
6 changes: 3 additions & 3 deletions Source/Controls/BufferEditor/BufferEditor.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
using AvaloniaEdit;
using AvaloniaEdit.TextMate;
using AvaloniaEdit.TextMate.Grammars;
using MQTTnetApp.Extensions;
using MQTTnetApp.Main;
using mqttMultimeter.Extensions;
using mqttMultimeter.Main;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace MQTTnetApp.Controls;
namespace mqttMultimeter.Controls;

public sealed class BufferEditor : TemplatedControl
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Controls/BufferEditor/BufferFormat.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace MQTTnetApp.Controls;
namespace mqttMultimeter.Controls;

public enum BufferFormat
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Controls/BufferPreview/BufferConverter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace MQTTnetApp.Controls;
namespace mqttMultimeter.Controls;

public sealed class BufferConverter
{
Expand Down
Loading

0 comments on commit 3f40b83

Please sign in to comment.