Skip to content

Commit d242da5

Browse files
Merge pull request #20 from IowaComputerGurus/feature/net6.0
Updated to .NET 6.0
2 parents c589e51 + 1a9475d commit d242da5

File tree

9 files changed

+134
-26
lines changed

9 files changed

+134
-26
lines changed

.github/workflows/ci-build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI Build
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
pull_request:
7+
branches: [ develop ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
name: Validate Build
14+
env:
15+
solution-path: './src/NetCore.Utilities.Spreadsheet.sln'
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Ensure .NET Installed
22+
uses: actions/setup-dotnet@v1
23+
with:
24+
dotnet-version: 6.0.x
25+
26+
- name: Install GitVersion
27+
run: dotnet tool install --global GitVersion.Tool
28+
29+
- name: Determine Version
30+
id: gitversion
31+
uses: gittools/actions/gitversion/execute@v0.9.7
32+
with:
33+
useConfigFile: true
34+
35+
- name: Restore Packages
36+
run: dotnet restore "${{ env.solution-path }}"
37+
- name: Build
38+
run: dotnet build "${{ env.solution-path }}" --no-restore --configuration Release -p:version=${{ steps.gitversion.outputs.majorMinorPatch }}
39+
- name: Test
40+
run: dotnet test "${{ env.solution-path }}" --no-build --configuration Release
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release Build
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
name: Build & Publish to NuGet
12+
environment: nuget
13+
env:
14+
solution-path: './src/NetCore.Utilities.Spreadsheet.sln'
15+
steps:
16+
- uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Ensure .NET Installed
21+
uses: actions/setup-dotnet@v1
22+
with:
23+
dotnet-version: 6.0.x
24+
25+
- name: Install GitVersion
26+
run: dotnet tool install --global GitVersion.Tool
27+
28+
- name: Determine Version
29+
id: gitversion
30+
uses: gittools/actions/gitversion/execute@v0.9.7
31+
with:
32+
useConfigFile: true
33+
34+
- name: Restore Packages
35+
run: dotnet restore "${{ env.solution-path }}"
36+
- name: Build
37+
run: dotnet build "${{ env.solution-path }}" --no-restore --configuration Release -p:version=${{ steps.gitversion.outputs.majorMinorPatch }}
38+
- name: Test
39+
run: dotnet test "${{ env.solution-path }}" --no-build --configuration Release
40+
41+
- name: Publish
42+
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.ICG_NUGET_API_KEY}}

GitVersion.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
mode: ContinuousDeployment
2+
next-version: 5.1.4
3+
branches:
4+
develop:
5+
regex: develop
6+
tag: 'alpha'
7+
increment: Patch
8+
source-branches: []
9+
pull-request:
10+
regex: (pull|pull\-requests|pr)[/-]
11+
tag: 'pr'
12+
tag-number-pattern: '[/-](?<number>\d+)[-/]'
13+
increment: Patch
14+
prevent-increment-of-merged-branch-version: false
15+
is-release-branch: false
16+
source-branches: []
17+
ignore:
18+
sha: []
19+
merge-message-formats: {}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 IowaComputerGurus, Inc.
3+
Copyright (c) 2021 IowaComputerGurus, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# NetCore.Utilities.Spreadsheet ![](https://img.shields.io/github/license/iowacomputergurus/netcore.utilities.spreadsheet.svg)
2-
A utility to assist in creating Excel spreadsheets in .NET Core and ASP.NET Core applications using the OpenXML library. This utility allows you to export collections of
3-
.NET Objects to Excel by simply adding metadata information regarding the desired column formats, title etc. Allowing quick & consistent excel exports, without the hassle of trying
4-
to understand the OpenXML format
2+
3+
![Build Status](https://github.com/IowaComputerGurus/netcore.utilities.spreadsheet/actions/workflows/ci-build.yml/badge.svg)
4+
5+
A utility to assist in creating Excel spreadsheets in .NET Core and ASP.NET Core applications using the OpenXML library. This utility allows you to export collections of .NET Objects to Excel by simply adding metadata information regarding the desired column formats, title etc. Allowing quick & consistent excel exports, without the hassle of trying to understand the OpenXML format
56

67
## NuGet Package Information
78
ICG.NetCore.Utilities.Spreadsheet ![](https://img.shields.io/nuget/v/icg.netcore.utilities.spreadsheet.svg) ![](https://img.shields.io/nuget/dt/icg.netcore.utilities.spreadsheet.svg)
@@ -13,21 +14,21 @@ This project depends on the DocumentFormat.OpenXml NuGet package provided by the
1314

1415
## Installation
1516
Standard installation via NuGet Package Manager
16-
```
17+
``` powershell
1718
Install-Package ICG.NetCore.Utilities.Spreadsheet
1819
```
1920

2021
## Setup
2122
To setup the needed dependency injection items for this library, add the following line in your DI setup.
22-
```
23+
``` csharp
2324
services.UseIcgNetCoreUtilitiesSpreadsheet();
2425
```
2526

2627
## Sample Single Document Export
2728

2829
Exporting a single collection to a single excel file can be done very simply.
2930

30-
```
31+
```csharp
3132
var exportGenerator = provider.GetService<ISpreadsheetGenerator>();
3233
var exportDefinition = new SpreadsheetConfiguration<SimpleExportData>
3334
{

samples/NetCore.Utilities.SpreadsheetExample/NetCore.Utilities.SpreadsheetExample.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="DocumentFOrmat.OpenXml" Version="2.12.3" />
10-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
9+
<PackageReference Include="DocumentFOrmat.OpenXml" Version="2.14.0" />
10+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>
1414
<Reference Include="NetCore.Utilities.Spreadsheet">
15-
<HintPath>..\..\src\NetCore.Utilities.Spreadsheet\bin\Debug\netcoreapp3.1\NetCore.Utilities.Spreadsheet.dll</HintPath>
15+
<HintPath>..\..\src\NetCore.Utilities.Spreadsheet\bin\Debug\net6.0\NetCore.Utilities.Spreadsheet.dll</HintPath>
1616
</Reference>
1717
</ItemGroup>
1818

src/NetCore.Utilities.Spreadsheet.Tests/NetCore.Utilities.Spreadsheet.Tests.csproj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
4+
<TargetFramework>net6.0</TargetFramework>
65
<IsPackable>false</IsPackable>
7-
86
<RootNamespace>ICG.NetCore.Utilities.Spreadsheet.Tests</RootNamespace>
97
</PropertyGroup>
108

119
<ItemGroup>
12-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
13-
<PackageReference Include="xunit" Version="2.4.0" />
14-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
11+
<PackageReference Include="xunit" Version="2.4.1" />
12+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
13+
<PrivateAssets>all</PrivateAssets>
14+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
15+
</PackageReference>
1516
</ItemGroup>
1617

1718
<ItemGroup>

src/NetCore.Utilities.Spreadsheet/NetCore.Utilities.Spreadsheet.csproj

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<Version>0.0.0</Version>
5-
</PropertyGroup>
6-
7-
<PropertyGroup>
8-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
95
<RootNamespace>ICG.NetCore.Utilities.Spreadsheet</RootNamespace>
106
<GenerateDocumentationFile>true</GenerateDocumentationFile>
7+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
118
</PropertyGroup>
129

1310
<PropertyGroup>
@@ -20,18 +17,26 @@
2017
<RepositoryUrl>https://github.com/IowaComputerGurus/netcore.utilities.spreadsheet</RepositoryUrl>
2118
<Authors>MitchelSellers;IowaComputerGurus</Authors>
2219
<Owners>IowaComputerGurus</Owners>
23-
<PackageIconUrl>https://raw.githubusercontent.com/IowaComputerGurus/netcore.utilities.spreadsheet/master/icgAppIcon.png</PackageIconUrl>
20+
<PackageIcon>icgAppIcon.png</PackageIcon>
2421
<IsPackable>True</IsPackable>
2522
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2623
<IncludeSymbols>true</IncludeSymbols>
2724
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2825
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2926
</PropertyGroup>
3027

28+
<PropertyGroup Condition="'$GITHUB_ACTIONS)' == 'true'">
29+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
30+
</PropertyGroup>
31+
32+
<ItemGroup>
33+
<None Include="icgAppIcon.png" Pack="true" PackagePath="\" />
34+
</ItemGroup>
35+
3136
<ItemGroup>
32-
<PackageReference Include="DocumentFormat.OpenXml" Version="2.12.3" />
33-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
34-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
37+
<PackageReference Include="DocumentFormat.OpenXml" Version="2.14.0" />
38+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
39+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
3540
<PrivateAssets>all</PrivateAssets>
3641
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3742
</PackageReference>

icgAppIcon.png renamed to src/NetCore.Utilities.Spreadsheet/icgAppIcon.png

File renamed without changes.

0 commit comments

Comments
 (0)