Skip to content

Commit

Permalink
Merge 4f12f36 into 5f6626c
Browse files Browse the repository at this point in the history
  • Loading branch information
Heathermcx authored Jan 11, 2024
2 parents 5f6626c + 4f12f36 commit 30336ce
Show file tree
Hide file tree
Showing 11 changed files with 131 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
if: matrix.configuration == 'Debug'
run: dotnet test --no-build

- name: Pack
if: matrix.configuration == 'Release'
run: dotnet pack --configuration ${{ matrix.configuration }} -o packages --no-build
#- name: Pack
# if: matrix.configuration == 'Release'
# run: dotnet pack --configuration ${{ matrix.configuration }} -o packages --no-build

- name: Upload packages
if: matrix.configuration == 'Release'
uses: actions/upload-artifact@v3
with:
name: packages
path: packages/
name: package
path: /home/runner/work/Blazor.Diagrams/Blazor.Diagrams/src/Blazor.Diagrams/bin/Release/*.nupkg
retention-days: 5
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Create release
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
name: Build - ${{ matrix.configuration }}

strategy:
matrix:
configuration: [ Release ]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
3.1.x
- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: semver
increment: patch

- name: Install version tool
run: dotnet tool install -g dotnetCampus.TagToVersion

- name: Set version
run: dotnet TagToVersion -t ${{ steps.version.outputs.version }}

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release

- name: Upload packages
uses: actions/upload-artifact@v3
with:
name: package
path: /home/runner/work/Blazor.Diagrams/Blazor.Diagrams/src/Blazor.Diagrams/bin/Release/*.nupkg
retention-days: 5

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version }}
release_name: Release ${{ steps.version.outputs.version }}
draft: false
prerelease: true

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: /home/runner/work/Blazor.Diagrams/Blazor.Diagrams/src/Blazor.Diagrams/bin/Release/*.nupkg
asset_name: package
asset_content_type: application/zip

3 changes: 3 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Import Project="build\Version.props" />
</Project>
5 changes: 5 additions & 0 deletions build/Version.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<Version>1.0.9</Version>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="globalPackagesFolder" value=".\packages" />
</config>
</configuration>
16 changes: 9 additions & 7 deletions src/Blazor.Diagrams.Core/Blazor.Diagrams.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Authors>zHaytam</Authors>
<Description>A fully customizable and extensible all-purpose diagrams library for Blazor</Description>
<AssemblyVersion>3.0.1</AssemblyVersion>
<FileVersion>3.0.1</FileVersion>
<RepositoryUrl>https://github.com/Blazor-Diagrams/Blazor.Diagrams</RepositoryUrl>
<Version>3.0.1</Version>
<PackageId>Z.Blazor.Diagrams.Core</PackageId>
<AssemblyVersion>1.0</AssemblyVersion>
<FileVersion>1.0</FileVersion>
<RepositoryUrl>https://github.com/WiseTechGlobal/Blazor.Diagrams</RepositoryUrl>
<PackageId>WTG.Z.Blazor.Diagrams.Core</PackageId>
<PackageTags>blazor diagrams diagramming svg drag</PackageTags>
<Product>Z.Blazor.Diagrams.Core</Product>
<Product>WTG.Z.Blazor.Diagrams.Core</Product>
<PackageIcon>ZBD.png</PackageIcon>
<PackageProjectUrl>https://blazor-diagrams.zhaytam.com/</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\Blazor.Diagrams\sgKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand All @@ -32,6 +33,7 @@

<ItemGroup>
<PackageReference Include="SvgPathProperties" Version="1.1.2" />
<PackageReference Include="Brutal.Dev.StrongNameSigner" Version="3.3.3" PrivateAssets="All"/>
</ItemGroup>

</Project>
7 changes: 3 additions & 4 deletions src/Blazor.Diagrams.Core/Diagram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
using Blazor.Diagrams.Core.Controls;
using Blazor.Diagrams.Core.Behaviors.Base;

[assembly: InternalsVisibleTo("Blazor.Diagrams")]
[assembly: InternalsVisibleTo("Blazor.Diagrams.Tests")]
[assembly: InternalsVisibleTo("Blazor.Diagrams.Core.Tests")]

[assembly: InternalsVisibleTo("Blazor.Diagrams, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b19ccf452d560c78a01faeff3ea2dd095ebc2b24abb6ce02394e44ecc5fad730037d475c0678cbfc201a727462866c8148fe30e0171816b7569e0d0e74f01d741cd84dfde651f0d817a74e1121566b66759566601eceaf504566c83a9c1fd9b574c48652f0e183919f951e5dd39085964a6bb4bb1edf3c15226acab7d73bf7cf")]
[assembly: InternalsVisibleTo("Blazor.Diagrams.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b19ccf452d560c78a01faeff3ea2dd095ebc2b24abb6ce02394e44ecc5fad730037d475c0678cbfc201a727462866c8148fe30e0171816b7569e0d0e74f01d741cd84dfde651f0d817a74e1121566b66759566601eceaf504566c83a9c1fd9b574c48652f0e183919f951e5dd39085964a6bb4bb1edf3c15226acab7d73bf7cf")]
[assembly: InternalsVisibleTo("Blazor.Diagrams.Core.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b19ccf452d560c78a01faeff3ea2dd095ebc2b24abb6ce02394e44ecc5fad730037d475c0678cbfc201a727462866c8148fe30e0171816b7569e0d0e74f01d741cd84dfde651f0d817a74e1121566b66759566601eceaf504566c83a9c1fd9b574c48652f0e183919f951e5dd39085964a6bb4bb1edf3c15226acab7d73bf7cf")]
namespace Blazor.Diagrams.Core;

public abstract class Diagram
Expand Down
27 changes: 20 additions & 7 deletions src/Blazor.Diagrams/Blazor.Diagrams.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,29 @@
<Nullable>enable</Nullable>
<Authors>zHaytam</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<AssemblyVersion>3.0.1</AssemblyVersion>
<FileVersion>3.0.1</FileVersion>
<RepositoryUrl>https://github.com/Blazor-Diagrams/Blazor.Diagrams</RepositoryUrl>
<AssemblyVersion>1.0</AssemblyVersion>
<FileVersion>1.0</FileVersion>
<RepositoryUrl>https://github.com/WiseTechGlobal/Blazor.Diagrams</RepositoryUrl>
<Description>A fully customizable and extensible all-purpose diagrams library for Blazor</Description>
<Version>3.0.1</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageTags>blazor diagrams diagramming svg drag</PackageTags>
<PackageId>Z.Blazor.Diagrams</PackageId>
<PackageId>WTG.Z.Blazor.Diagrams</PackageId>
<PackageProjectUrl>https://blazor-diagrams.zhaytam.com/</PackageProjectUrl>
<Product>Z.Blazor.Diagrams</Product>
<Product>WTG.Z.Blazor.Diagrams</Product>
<PackageIcon>ZBD.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>sgKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.25" />
<PackageReference Include="Brutal.Dev.StrongNameSigner" Version="3.3.3" PrivateAssets="All"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Blazor.Diagrams.Core\Blazor.Diagrams.Core.csproj" />
<ProjectReference Include="..\Blazor.Diagrams.Core\Blazor.Diagrams.Core.csproj" PrivateAssets="All"/>
</ItemGroup>

<ItemGroup>
Expand All @@ -50,4 +52,15 @@
<Exec Command="webcompiler -r wwwroot" StandardOutputImportance="high" StandardErrorImportance="high" />
</Target>

<PropertyGroup>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);GetSvgPathPropertiesForPackage</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>

<Target Name="GetSvgPathPropertiesForPackage">
<ItemGroup>
<BuildOutputInPackage Include="$(OutputPath)Blazor.Diagrams.Core.dll;..\..\packages\svgpathproperties\1.1.2\lib\netstandard2.0\SvgPathProperties.dll">
</BuildOutputInPackage>
</ItemGroup>
</Target>

</Project>
Binary file added src/Blazor.Diagrams/sgKey.snk
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\src\Blazor.Diagrams\sgKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion tests/Blazor.Diagrams.Tests/Blazor.Diagrams.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\src\Blazor.Diagrams\sgKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="bunit" Version="1.4.15" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Moq" Version="[4.18.4]" />
<PackageReference Include="Moq" Version="[4.18.4]" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand All @@ -25,6 +27,7 @@

<ItemGroup>
<ProjectReference Include="..\..\src\Blazor.Diagrams\Blazor.Diagrams.csproj" />
<ProjectReference Include="..\..\src\Blazor.Diagrams.Core\Blazor.Diagrams.Core.csproj" />
</ItemGroup>

</Project>

0 comments on commit 30336ce

Please sign in to comment.