Skip to content

Commit

Permalink
housekeeping: Fix warnings and add release (#420)
Browse files Browse the repository at this point in the history
* housekeeping: add new release process

* housekeeping: fix warnings and update roslynator

Add a release action
  • Loading branch information
glennawatson authored Oct 6, 2020
1 parent b375a15 commit 27571b2
Show file tree
Hide file tree
Showing 63 changed files with 1,036 additions and 1,026 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,8 @@ jobs:
run: |
dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg
- name: Changelog
uses: scottbrenner/generate-changelog-action@master
id: changelog
- name: Create Tag
if: env.validRelease == 'true'
env:
REPO: ${{ github.repository }}

- name: Create Release
uses: actions/create-release@v1
if: env.validRelease == 'true'
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: Release ${{ steps.nbgv.outputs.SemVer2 }}
body: |
${{ steps.changelog.outputs.changelog }}
run: |
git tag v${{ steps.nbgv.outputs.SemVer2 }} main
git push
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

on:
push:
# Pattern matched against refs/tags
tags:
- v*
jobs:
build: # Push events to every tag
runs-on: ubuntu-latest
steps:
- name: Changelog
uses: scottbrenner/generate-changelog-action@master
id: changelog
if: env.validRelease == 'true'
env:
REPO: ${{ github.repository }}

- name: Create Release
uses: actions/create-release@v1
if: env.validRelease == 'true'
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: Release ${{ steps.nbgv.outputs.SemVer2 }}
body: |
${{ steps.changelog.outputs.changelog }}
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<Authors>Roland Pheasant</Authors>
<Owners>Roland Pheasant</Owners>
<Copyright>Copyright (c) Roland Pheasant 2011-2019</Copyright>
<Copyright>Copyright (c) Roland Pheasant 2011-2020</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>http://dynamic-data.org</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/reactiveui/styleguide/master/logo_dynamic_data/main.png</PackageIconUrl>
Expand Down Expand Up @@ -57,6 +57,6 @@

<ItemGroup Condition="!$(IsTestProject) AND !$(IsBenchmarkProject)">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" Version="2.3.0" PrivateAssets="All" />
<PackageReference Include="Roslynator.Analyzers" Version="3.0.0" PrivateAssets="All" />
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion src/DynamicData.Benchmarks/Cache/SourceCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using System.Linq;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;

namespace DynamicData.Benchmarks.Cache
{
Expand All @@ -17,7 +18,7 @@ public BenchmarkItem(int id)
}
}

[CoreJob]
[SimpleJob(RuntimeMoniker.NetCoreApp31)]
[MemoryDiagnoser]
[MarkdownExporterAttribute.GitHub]
public class SourceCache
Expand Down
3 changes: 2 additions & 1 deletion src/DynamicData.Benchmarks/List/GroupAdd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
using System;
using System.Linq;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;

namespace DynamicData.Benchmarks.List
{
[CoreJob]
[SimpleJob(RuntimeMoniker.NetCoreApp31)]
[MemoryDiagnoser]
[MarkdownExporterAttribute.GitHub]
public class GroupAdd
Expand Down
3 changes: 2 additions & 1 deletion src/DynamicData.Benchmarks/List/GroupRemove.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
using System;
using System.Linq;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;

namespace DynamicData.Benchmarks.List
{
[CoreJob]
[SimpleJob(RuntimeMoniker.NetCoreApp31)]
[MemoryDiagnoser]
[MarkdownExporterAttribute.GitHub]
public class GroupRemove
Expand Down
3 changes: 2 additions & 1 deletion src/DynamicData.Benchmarks/List/SourceList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

using System.Linq;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;

namespace DynamicData.Benchmarks.List
{
[CoreJob]
[SimpleJob(RuntimeMoniker.NetCoreApp31)]
[MemoryDiagnoser]
[MarkdownExporterAttribute.GitHub]
public class SourceList
Expand Down
10 changes: 5 additions & 5 deletions src/DynamicData/Aggregation/AggregationEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static IObservable<IAggregateChangeSet<TObject>> ForAggregation<TObject>(
}

/// <summary>
/// Applies an accumulator when items are added to and removed from specified stream,
/// Applies an accumulator when items are added to and removed from specified stream,
/// starting with the initial seed
/// </summary>
/// <typeparam name="TObject">The type of the object.</typeparam>
Expand All @@ -72,7 +72,7 @@ internal static IObservable<TResult> Accumlate<TObject, TResult>([NotNull] this
}

/// <summary>
/// Applies an accumulator when items are added to and removed from specified stream,
/// Applies an accumulator when items are added to and removed from specified stream,
/// starting with the initial seed
/// </summary>
/// <typeparam name="TObject">The type of the object.</typeparam>
Expand All @@ -94,7 +94,7 @@ internal static IObservable<TResult> Accumlate<TObject, TKey, TResult>([NotNull]
}

/// <summary>
/// Applies an accumulator when items are added to and removed from specified stream,
/// Applies an accumulator when items are added to and removed from specified stream,
/// starting with the initial seed
/// </summary>
/// <typeparam name="TObject">The type of the object.</typeparam>
Expand Down Expand Up @@ -142,7 +142,7 @@ internal static IObservable<TResult> Accumlate<TObject, TResult>([NotNull] this
}

/// <summary>
/// Used to invalidate an aggregating stream. Used when there has been an inline change
/// Used to invalidate an aggregating stream. Used when there has been an inline change
/// i.e. a property changed or meta data has changed
/// </summary>
/// <typeparam name="T"></typeparam>
Expand All @@ -158,7 +158,7 @@ public static IObservable<T> InvalidateWhen<T>(this IObservable<T> source, IObse
}

/// <summary>
/// Used to invalidate an aggregating stream. Used when there has been an inline change
/// Used to invalidate an aggregating stream. Used when there has been an inline change
/// </summary>
/// <typeparam name="T"></typeparam>
/// <typeparam name="TTrigger">The type of the trigger.</typeparam>
Expand Down
3 changes: 1 addition & 2 deletions src/DynamicData/Aggregation/MaxEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
namespace DynamicData.Aggregation
{
/// <summary>
/// Maximum and minimum value extensions
///
/// Maximum and minimum value extensions.
/// </summary>
public static class MaxEx
{
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/Alias/ObservableCacheAlias.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public static IObservable<IChangeSet<Node<TObject, TKey>, TKey>> SelectTree<TObj
#region Transform many -> SelectMany

/// <summary>
/// Equivalent to a select many transform. To work, the key must individually identify each child.
/// Equivalent to a select many transform. To work, the key must individually identify each child.
/// </summary>
/// <typeparam name="TDestination">The type of the destination.</typeparam>
/// <typeparam name="TDestinationKey">The type of the destination key.</typeparam>
Expand Down
3 changes: 1 addition & 2 deletions src/DynamicData/Binding/AbstractNotifyPropertyChanged.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ protected virtual void SetAndRaise<T>(ref T backingField, T newValue, IEqualityC
/// <summary>
/// Suspends notifications. When disposed, a reset notification is fired
/// </summary>
/// <returns></returns>
///
/// <returns>A disposable to indicate to stop suspending the notifications.</returns>
[Obsolete("This never worked properly in the first place")]
[SuppressMessage("Design", "CA1822: Make static", Justification = "Backwards compatibility")]
public IDisposable SuspendNotifications(bool invokePropertyChangeEventWhenDisposed = true)
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/Binding/BindingListAdaptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void Adapt(IChangeSet<TObject, TKey> changes)
}
}

private void DoUpdate(IChangeSet<TObject, TKey> changes, BindingList<TObject> list)
private static void DoUpdate(IChangeSet<TObject, TKey> changes, BindingList<TObject> list)
{
foreach (var update in changes)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace DynamicData.Binding
{
/// <summary>
/// Represents an observable collection where collection changed and count notifications can be suspended
/// Represents an observable collection where collection changed and count notifications can be suspended.
/// </summary>
public interface INotifyCollectionChangedSuspender
{
Expand Down
4 changes: 4 additions & 0 deletions src/DynamicData/Binding/IObservableListEx.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reactive.Linq;

Expand All @@ -17,6 +18,7 @@ public static class IObservableListEx
/// </summary>
/// <typeparam name="TObject">The type of the object.</typeparam>
/// <param name="source">The source.</param>
/// <param name="observableList">The output observable list.</param>
/// <returns>The <paramref name="source"/> changeset for continued chaining.</returns>
/// <exception cref="System.ArgumentNullException">source</exception>
public static IObservable<IChangeSet<TObject>> BindToObservableList<TObject>(
Expand Down Expand Up @@ -50,6 +52,7 @@ public static IObservable<IChangeSet<TObject>> BindToObservableList<TObject>(
/// <typeparam name="TObject">The type of the object.</typeparam>
/// <typeparam name="TKey">The type of the key.</typeparam>
/// <param name="source">The source.</param>
/// <param name="observableList">The observable list which is the output.</param>
/// <returns>The <paramref name="source"/> changeset for continued chaining.</returns>
/// <exception cref="System.ArgumentNullException">source</exception>
public static IObservable<IChangeSet<TObject, TKey>> BindToObservableList<TObject, TKey>(
Expand Down Expand Up @@ -84,6 +87,7 @@ public static IObservable<IChangeSet<TObject, TKey>> BindToObservableList<TObjec
/// <typeparam name="TObject">The type of the object.</typeparam>
/// <typeparam name="TKey">The type of the key.</typeparam>
/// <param name="source">The source.</param>
/// <param name="observableList">The output observable list.</param>
/// <returns>The <paramref name="source"/> changeset for continued chaining.</returns>
/// <exception cref="System.ArgumentNullException">source</exception>
public static IObservable<ISortedChangeSet<TObject, TKey>> BindToObservableList<TObject, TKey>(
Expand Down
Loading

0 comments on commit 27571b2

Please sign in to comment.