diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index a4dce4c2b4..0000000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,4 +0,0 @@ -template: | - ## What's Changed - - $CHANGES diff --git a/.github/workflows/build-samples.yml b/.github/workflows/build-samples.yml index c0d46d5e18..b929de59ad 100644 --- a/.github/workflows/build-samples.yml +++ b/.github/workflows/build-samples.yml @@ -70,4 +70,4 @@ jobs: - name: Restore/Build the sample run: msbuild IntegrationTests.All.sln /t:restore,build /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=Release - working-directory: integrationtests + working-directory: integrationtests \ No newline at end of file diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index a91ec77761..aad706b99a 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -4,7 +4,6 @@ on: push: branches: [ main ] pull_request: - types: [opened, synchronize, reopened, closed] branches: [ main ] env: @@ -122,57 +121,4 @@ jobs: uses: actions/upload-artifact@master with: name: nuget - path: '**/*.nupkg' - - release: - runs-on: ubuntu-latest - needs: build - if: contains(github.event.pull_request.labels.*.name, 'release') && github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Download NuGet Packages - uses: actions/download-artifact@v2 - with: - name: nuget - - - name: Save SignClient Configuration - run: 'echo "$SIGN_CLIENT_CONFIG" > SignPackages.json' - shell: bash - env: - SIGN_CLIENT_CONFIG: ${{secrets.SIGN_CLIENT_CONFIG}} - - - name: Sign NuGet Packages - uses: glennawatson/signclient@v1 - with: - input-files: '**/*.nupkg' - sign-client-secret: ${{ secrets.SIGN_CLIENT_SECRET }} - sign-client-user: ${{ secrets.SIGN_CLIENT_USER_ID }} - project-name: reactiveui - description: reactiveui - config-file: SignPackages.json - - - name: Changelog - uses: glennawatson/ChangeLog@v1 - id: changelog - - - name: Create Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ needs.build.outputs.nbgv }} - release_name: ${{ needs.build.outputs.nbgv }} - body: | - ${{ steps.changelog.outputs.commitLog }} - - - name: NuGet Push - env: - NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }} - SOURCE_URL: https://api.nuget.org/v3/index.json - run: | - dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg - + path: '**/*.nupkg' \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..02f3484ca4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,122 @@ +name: Build and Release + +on: + push: + branches: [ main ] + +env: + configuration: Release + productNamespacePrefix: "ReactiveUI" + +jobs: + release: + runs-on: windows-2022 + environment: + name: release + steps: + - name: Update VS2022 preview + shell: bash + run: | + dotnet tool update -g dotnet-vs + vs modify preview +mobile +desktop +uwp +web + echo "##vso[task.prependpath]$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin" + + - name: Install Windows SDK 10.0.16299 + shell: pwsh + run: | + Invoke-WebRequest -Uri https://go.microsoft.com/fwlink/p/?linkid=864422 -OutFile winsdk.exe + $startInfo = New-Object System.Diagnostics.ProcessStartInfo + $startInfo.FileName = "winsdk.exe" + $startInfo.Arguments = "/norestart /quiet" + $process = New-Object System.Diagnostics.Process + $process.StartInfo = $startInfo + $process.Start() + $process.WaitForExit() + + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install .NET Core + uses: actions/setup-dotnet@v1.8.2 + with: + dotnet-version: 3.1.x + + - name: Install .NET 5 + uses: actions/setup-dotnet@v1.8.2 + with: + dotnet-version: 5.0.x + + - name: Install .NET 6 + uses: actions/setup-dotnet@v1.8.2 + with: + dotnet-version: 6.0.x + include-prerelease: true + + - name: Install DotNet workloads + shell: bash + run: | + dotnet workload install android + dotnet workload install ios + dotnet workload install tvos + dotnet workload install macos + dotnet workload install maui + dotnet tool install -g Redth.Net.Maui.Check + maui-check --non-interactive --fix + + - name: Add MSBuild to PATH + uses: glennawatson/setup-msbuild@v1.0.3 + with: + prerelease: true + + - name: NBGV + id: nbgv + uses: dotnet/nbgv@master + with: + setAllVars: true + + - name: NuGet Restore + run: dotnet restore + working-directory: src + + - name: Build + run: msbuild /t:build,pack /nowarn:MSB4011 /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=${{ env.configuration }} + working-directory: src + + - name: Save SignClient Configuration + run: 'echo "$SIGN_CLIENT_CONFIG" > SignPackages.json' + shell: bash + env: + SIGN_CLIENT_CONFIG: ${{secrets.SIGN_CLIENT_CONFIG}} + + - name: Sign NuGet Packages + uses: glennawatson/signclient@v1 + with: + input-files: '**/*.nupkg' + sign-client-secret: ${{ secrets.SIGN_CLIENT_SECRET }} + sign-client-user: ${{ secrets.SIGN_CLIENT_USER_ID }} + project-name: reactiveui + description: reactiveui + config-file: SignPackages.json + + - name: Changelog + uses: glennawatson/ChangeLog@v1 + id: changelog + + - name: Create Release + uses: actions/create-release@v1.1.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ steps.nbgv.outputs.SemVer2 }} + release_name: ${{ steps.nbgv.outputs.SemVer2 }} + body: | + ${{ steps.changelog.outputs.commitLog }} + + - name: NuGet Push + env: + NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }} + SOURCE_URL: https://api.nuget.org/v3/index.json + run: | + dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg diff --git a/src/ReactiveUI.Tests/Platforms/windows-xaml/Api/XamlApiApprovalTests.Blend.Net4_8.received.txt b/src/ReactiveUI.Tests/Platforms/windows-xaml/Api/XamlApiApprovalTests.Blend.Net4_8.received.txt new file mode 100644 index 0000000000..68df170501 --- /dev/null +++ b/src/ReactiveUI.Tests/Platforms/windows-xaml/Api/XamlApiApprovalTests.Blend.Net4_8.received.txt @@ -0,0 +1,23 @@ +[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName=".NET Framework 4.7.2")] +namespace ReactiveUI.Blend +{ + public class FollowObservableStateBehavior : Microsoft.Xaml.Behaviors.Behavior + { + public static readonly System.Windows.DependencyProperty StateObservableProperty; + public static readonly System.Windows.DependencyProperty TargetObjectProperty; + public FollowObservableStateBehavior() { } + public bool AutoResubscribeOnError { get; set; } + public System.IObservable StateObservable { get; set; } + public System.Windows.FrameworkElement TargetObject { get; set; } + protected override void OnDetaching() { } + protected static void OnStateObservableChanged(System.Windows.DependencyObject? sender, System.Windows.DependencyPropertyChangedEventArgs e) { } + } + public class ObservableTrigger : Microsoft.Xaml.Behaviors.TriggerBase + { + public static readonly System.Windows.DependencyProperty ObservableProperty; + public ObservableTrigger() { } + public bool AutoResubscribeOnError { get; set; } + public System.IObservable Observable { get; set; } + protected static void OnObservableChanged(System.Windows.DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs e) { } + } +} \ No newline at end of file diff --git a/src/ReactiveUI.Tests/Platforms/winforms/API/WinformsApiApprovalTests.Winforms.DotNet5_0.received.txt b/src/ReactiveUI.Tests/Platforms/winforms/API/WinformsApiApprovalTests.Winforms.DotNet5_0.received.txt new file mode 100644 index 0000000000..d7c59a6dc1 --- /dev/null +++ b/src/ReactiveUI.Tests/Platforms/winforms/API/WinformsApiApprovalTests.Winforms.DotNet5_0.received.txt @@ -0,0 +1,119 @@ +[assembly: System.Runtime.Versioning.SupportedOSPlatform("Windows7.0")] +[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v5.0", FrameworkDisplayName="")] +[assembly: System.Runtime.Versioning.TargetPlatform("Windows7.0")] +namespace ReactiveUI.Winforms +{ + public class ActivationForViewFetcher : ReactiveUI.IActivationForViewFetcher, Splat.IEnableLogger + { + public ActivationForViewFetcher() { } + public System.IObservable GetActivationForView(ReactiveUI.IActivatableView view) { } + public int GetAffinityForView(System.Type view) { } + } + public class ContentControlBindingHook : ReactiveUI.IPropertyBindingHook + { + public ContentControlBindingHook() { } + public bool ExecuteHook(object? source, object target, System.Func[]> getCurrentViewModelProperties, System.Func[]> getCurrentViewProperties, ReactiveUI.BindingDirection direction) { } + } + public class CreatesWinformsCommandBinding : ReactiveUI.ICreatesCommandBinding + { + public CreatesWinformsCommandBinding() { } + public System.IDisposable? BindCommandToObject(System.Windows.Input.ICommand? command, object? target, System.IObservable commandParameter) { } + public System.IDisposable? BindCommandToObject(System.Windows.Input.ICommand? command, object? target, System.IObservable commandParameter, string eventName) { } + public int GetAffinityForObject(System.Type type, bool hasEventTarget) { } + } + public class PanelSetMethodBindingConverter : ReactiveUI.ISetMethodBindingConverter, Splat.IEnableLogger + { + public PanelSetMethodBindingConverter() { } + public int GetAffinityForObjects(System.Type? fromType, System.Type? toType) { } + public object PerformSet(object? toTarget, object? newValue, object?[]? arguments) { } + } + public class PlatformOperations : ReactiveUI.IPlatformOperations + { + public PlatformOperations() { } + public string? GetOrientation() { } + } + public class ReactiveUserControl : System.Windows.Forms.UserControl, ReactiveUI.IActivatableView, ReactiveUI.IViewFor, ReactiveUI.IViewFor + where TViewModel : class + { + public ReactiveUserControl() { } + [System.ComponentModel.Bindable(true)] + [System.ComponentModel.Category("ReactiveUI")] + [System.ComponentModel.Description("The ViewModel.")] + [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public TViewModel ViewModel { get; set; } + protected override void Dispose(bool disposing) { } + } + public class Registrations + { + public Registrations() { } + public void Register(System.Action, System.Type> registerFunction) { } + } + [System.ComponentModel.DefaultProperty("ViewModel")] + public class RoutedControlHost : System.Windows.Forms.UserControl, ReactiveUI.IReactiveObject, Splat.IEnableLogger, System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.INotifyPropertyChanging + { + public RoutedControlHost() { } + [System.ComponentModel.Category("ReactiveUI")] + [System.ComponentModel.Description("The default control when no viewmodel is specified")] + public System.Windows.Forms.Control? DefaultContent { get; set; } + [System.ComponentModel.Category("ReactiveUI")] + [System.ComponentModel.Description("The router.")] + public ReactiveUI.RoutingState? Router { get; set; } + [System.ComponentModel.Browsable(false)] + public System.IObservable? ViewContractObservable { get; set; } + [System.ComponentModel.Browsable(false)] + public ReactiveUI.IViewLocator? ViewLocator { get; set; } + public event System.ComponentModel.PropertyChangedEventHandler? PropertyChanged; + public event System.ComponentModel.PropertyChangingEventHandler? PropertyChanging; + protected override void Dispose(bool disposing) { } + } + public class TableContentSetMethodBindingConverter : ReactiveUI.ISetMethodBindingConverter, Splat.IEnableLogger + { + public TableContentSetMethodBindingConverter() { } + public int GetAffinityForObjects(System.Type? fromType, System.Type? toType) { } + public object PerformSet(object? toTarget, object? newValue, object?[]? arguments) { } + } + [System.ComponentModel.DefaultProperty("ViewModel")] + public class ViewModelControlHost : System.Windows.Forms.UserControl, ReactiveUI.IActivatableView, ReactiveUI.IReactiveObject, ReactiveUI.IViewFor, Splat.IEnableLogger, System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.INotifyPropertyChanging + { + public ViewModelControlHost() { } + [System.ComponentModel.Bindable(true)] + [System.ComponentModel.Category("ReactiveUI")] + [System.ComponentModel.DefaultValue(true)] + [System.ComponentModel.Description("Cache Views")] + public bool CacheViews { get; set; } + [System.ComponentModel.Bindable(true)] + [System.ComponentModel.Category("ReactiveUI")] + [System.ComponentModel.Description("The Current View")] + public object? Content { get; set; } + public System.Windows.Forms.Control? CurrentView { get; } + [System.ComponentModel.Category("ReactiveUI")] + [System.ComponentModel.Description("The default control when no viewmodel is specified")] + public System.Windows.Forms.Control? DefaultContent { get; set; } + [System.ComponentModel.Browsable(false)] + public System.IObservable? ViewContractObservable { get; set; } + [System.ComponentModel.Browsable(false)] + public ReactiveUI.IViewLocator? ViewLocator { get; set; } + [System.ComponentModel.Bindable(true)] + [System.ComponentModel.Category("ReactiveUI")] + [System.ComponentModel.Description("The viewmodel to host.")] + public object? ViewModel { get; set; } + public static bool DefaultCacheViewsEnabled { get; set; } + public event System.ComponentModel.PropertyChangedEventHandler? PropertyChanged; + public event System.ComponentModel.PropertyChangingEventHandler? PropertyChanging; + protected override void Dispose(bool disposing) { } + } + public class WinformsCreatesObservableForProperty : ReactiveUI.ICreatesObservableForProperty, Splat.IEnableLogger + { + public WinformsCreatesObservableForProperty() { } + public int GetAffinityForObject(System.Type type, string propertyName, bool beforeChanged = false) { } + public System.IObservable> GetNotificationForProperty(object sender, System.Linq.Expressions.Expression expression, string propertyName, bool beforeChanged = false, bool suppressWarnings = false) { } + } +} +namespace System.Reactive.Concurrency +{ + public class ControlScheduler : System.Reactive.Concurrency.LocalScheduler, System.Reactive.Concurrency.ISchedulerPeriodic { } +} +namespace System.Reactive.Linq +{ + public static class ControlObservable { } +} \ No newline at end of file