Skip to content

Commit 38720ef

Browse files
authored
Merge pull request #2 from NinjaRocks/dev-01
Upgrade to .net standard 2.1
2 parents 9fe0c45 + fdeedfa commit 38720ef

File tree

9 files changed

+318
-24
lines changed

9 files changed

+318
-24
lines changed

.github/workflows/CI-Build.yml

+162
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
name: CI
2+
'on':
3+
pull_request:
4+
types: [opened, reopened, edited, synchronize]
5+
paths-ignore:
6+
- "**/*.md"
7+
- "**/*.gitignore"
8+
- "**/*.gitattributes"
9+
jobs:
10+
Run-Lint:
11+
runs-on: ubuntu-latest
12+
env:
13+
github-token: '${{ secrets.GITHUB_TOKEN }}'
14+
steps:
15+
- name: Step-01 Checkout code
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
- name: Step-02 Lint Code Base
20+
uses: github/super-linter@v4
21+
env:
22+
VALIDATE_ALL_CODEBASE: false
23+
FILTER_REGEX_INCLUDE: .*src/.*
24+
DEFAULT_BRANCH: master
25+
GITHUB_TOKEN: '${{ env.github-token }}'
26+
Build-Beta:
27+
if: ${{ !startsWith(github.head_ref, 'release/')}}
28+
runs-on: ubuntu-latest
29+
outputs:
30+
semVersion: ${{ steps.gitversion.outputs.MajorMinorPatch }}
31+
branchName: ${{ steps.gitversion.outputs.branchName }}
32+
env:
33+
working-directory: /home/runner/work/FileUtil.Core/FileUtil.Core
34+
35+
steps:
36+
- name: Step-01 Install GitVersion
37+
uses: gittools/actions/gitversion/[email protected]
38+
with:
39+
versionSpec: 5.x
40+
41+
- name: Step-02 Check out Code
42+
uses: actions/checkout@v2
43+
with:
44+
fetch-depth: 0
45+
46+
- name: Step-03 Calculate Version
47+
id: gitversion
48+
uses: gittools/actions/gitversion/[email protected]
49+
with:
50+
useConfigFile: true
51+
52+
- name: Step-04 Install .NET
53+
uses: actions/setup-dotnet@v3
54+
with:
55+
dotnet-version: 6.0.x
56+
57+
- name: Step-05 Restore dependencies
58+
run: dotnet restore
59+
working-directory: '${{ env.working-directory }}'
60+
61+
- name: Step-06 Build Beta Version
62+
run: dotnet build --configuration Release --no-restore -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }}
63+
working-directory: '${{ env.working-directory }}'
64+
65+
- name: Step-07 Test Solution
66+
run: dotnet test --configuration Release --no-build --no-restore --verbosity normal
67+
working-directory: '${{ env.working-directory }}'
68+
69+
- name: Step-08 Upload Build Artifacts
70+
uses: actions/upload-artifact@v3
71+
with:
72+
name: build-artifact
73+
path: ${{env.working-directory}}
74+
retention-days: 1
75+
Build-Release:
76+
if: ${{ startsWith(github.head_ref, 'release/') }}
77+
runs-on: ubuntu-latest
78+
outputs:
79+
semVersion: ${{ steps.gitversion.outputs.MajorMinorPatch }}
80+
branchName: ${{ steps.gitversion.outputs.branchName }}
81+
env:
82+
working-directory: /home/runner/work/FileUtil.Core/FileUtil.Core
83+
84+
steps:
85+
- name: Step-01 Install GitVersion
86+
uses: gittools/actions/gitversion/[email protected]
87+
with:
88+
versionSpec: 5.x
89+
90+
- name: Step-02 Check out Code
91+
uses: actions/checkout@v2
92+
with:
93+
fetch-depth: 0
94+
95+
- name: Step-03 Calculate Version
96+
id: gitversion
97+
uses: gittools/actions/gitversion/[email protected]
98+
with:
99+
useConfigFile: true
100+
101+
- name: Step-04 Install .NET
102+
uses: actions/setup-dotnet@v3
103+
with:
104+
dotnet-version: 6.0.x
105+
106+
- name: Step-05 Restore dependencies
107+
run: dotnet restore
108+
working-directory: '${{ env.working-directory }}'
109+
110+
- name: Step-06 Build Release Version
111+
if: ('startsWith(github.ref, ''refs/heads/release'')')
112+
run: dotnet build --configuration Release --no-restore -p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }}
113+
working-directory: '${{ env.working-directory }}'
114+
115+
- name: Step-07 Test Solution
116+
run: dotnet test --configuration Release --no-build --no-restore --verbosity normal
117+
working-directory: '${{ env.working-directory }}'
118+
119+
- name: Step-08 Upload Build Artifacts
120+
uses: actions/upload-artifact@v3
121+
with:
122+
name: build-artifact
123+
path: ${{env.working-directory}}
124+
retention-days: 1
125+
Package-Release:
126+
needs: [Build-Beta, Build-Release]
127+
if: |
128+
always() &&
129+
(needs.Build-Beta.result == 'success' || needs.Build-Release.result == 'success')
130+
runs-on: ubuntu-latest
131+
outputs:
132+
semVersion: ${{ needs.Build-Release.outputs.semVersion }}
133+
env:
134+
github-token: '${{ secrets.GITHUB_TOKEN }}'
135+
nuget-token: '${{ secrets.NUGET_API_KEY }}'
136+
working-directory: /home/runner/work/FileUtil.Core/FileUtil.Core
137+
steps:
138+
- name: Step-01 Retrieve Build Artifacts
139+
uses: actions/download-artifact@v3
140+
with:
141+
name: build-artifact
142+
path: ${{env.working-directory}}
143+
144+
- name: Step-02 Install Github Packages
145+
run: dotnet tool install gpr --global
146+
147+
- name: Step-03 Publish to Github Packages
148+
run: find -name "*.nupkg" -print -exec gpr push -k ${{env.github-token}} {} \;
149+
150+
- name: Step-02 Create Github Release
151+
if: ${{ startsWith(github.head_ref, 'release/')}}
152+
run: |
153+
curl \
154+
-X POST \
155+
-H "Accept:application/vnd.github+json" \
156+
-H "Authorization:token ${{ env.github-token }}" \
157+
https://api.github.com/ninjarocks/FileUtil.Core/releases \
158+
-d '{"tag_name":v1.0.0,"target_commitish":"master","name":"FileUtil.Core","body":"","draft":false,"prerelease":false,"generate_release_notes":false}'
159+
160+
- name: Step-03 Release to Nuget Org
161+
if: ${{ startsWith(github.head_ref, 'release/')}}
162+
run: dotnet nuget push ${{env.working-directory}}/src/FileUtil.Core/bin/Release/*.nupkg --skip-duplicate --api-key ${{ env.nuget-token }} --source https://api.nuget.org/v3/index.json

.github/workflows/codeql.yml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
pull_request:
16+
types: [opened, reopened, edited, synchronize]
17+
paths-ignore:
18+
- "**/*.md"
19+
- "**/*.gitignore"
20+
- "**/*.gitattributes"
21+
schedule:
22+
- cron: '35 15 * * 2'
23+
24+
jobs:
25+
analyze:
26+
name: Analyze
27+
runs-on: ubuntu-latest
28+
permissions:
29+
actions: read
30+
contents: read
31+
security-events: write
32+
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
language: [ 'csharp' ]
37+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
38+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v3
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v2
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
53+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
54+
# queries: security-extended,security-and-quality
55+
56+
57+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
58+
# If this step fails, then you should remove it and run the build manually (see below)
59+
- name: Autobuild
60+
uses: github/codeql-action/autobuild@v2
61+
62+
# ℹ️ Command-line programs to run using the OS shell.
63+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
64+
65+
# If the Autobuild fails above, remove it and uncomment the following three lines.
66+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
67+
68+
# - run: |
69+
# echo "Run, Build Application using script"
70+
# ./location_of_script_within_repo/buildscript.sh
71+
72+
- name: Perform CodeQL Analysis
73+
uses: github/codeql-action/analyze@v2
74+
with:
75+
category: "/language:${{matrix.language}}"

GitVersion.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
next-version: 1.0.5
2+
tag-prefix: '[vV]'
3+
mode: ContinuousDeployment
4+
branches:
5+
master:
6+
regex: ^master$
7+
release:
8+
regex: ^release$
9+
develop:
10+
regex: ^develop$|^dev$
11+
tag: beta
12+
pull-request:
13+
tag: beta
14+
ignore:
15+
sha: []

License.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Ninja
3+
Copyright (c) 2016 Ninja Sha!4H
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

Ninja.FileUtil.Core.sln

+25-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.28010.2050
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.6.33712.159
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution", "Solution", "{4181FF50-7335-4293-8EE4-66E0C47C736E}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ninja.FileUtil", "src\Ninja.FileUtil\Ninja.FileUtil.csproj", "{FD920B11-BA4F-4781-BD56-56CF362982CF}"
9+
EndProject
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ninja.FileUtil.Tests", "test\Ninja.FileUtil.Tests\Ninja.FileUtil.Tests.csproj", "{95A1410C-6FB4-446D-A692-9BC018882298}"
11+
EndProject
12+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{D549CC35-5318-45B0-ACCD-F28C543E482C}"
13+
ProjectSection(SolutionItems) = preProject
14+
.github\workflows\CI-Build.yml = .github\workflows\CI-Build.yml
15+
.github\workflows\codeql.yml = .github\workflows\codeql.yml
16+
EndProjectSection
17+
EndProject
18+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8A1A1535-2928-4313-9AFC-9CA1892426E3}"
19+
EndProject
20+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{F7C842B8-9D5C-4AF6-9F8B-779E1DEEEDC2}"
21+
EndProject
22+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".misc", ".misc", "{8EDBC8F3-0169-4422-B44F-92AD9B9C8D5B}"
723
ProjectSection(SolutionItems) = preProject
824
.gitattributes = .gitattributes
925
.gitignore = .gitignore
1026
.travis.yml = .travis.yml
27+
GitVersion.yml = GitVersion.yml
1128
License.md = License.md
1229
ms-icon-310x310.png = ms-icon-310x310.png
1330
nuget.config = nuget.config
1431
README.md = README.md
1532
EndProjectSection
1633
EndProject
17-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ninja.FileUtil", "src\Ninja.FileUtil\Ninja.FileUtil.csproj", "{FD920B11-BA4F-4781-BD56-56CF362982CF}"
18-
EndProject
19-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ninja.FileUtil.Tests", "test\Ninja.FileUtil.Tests\Ninja.FileUtil.Tests.csproj", "{95A1410C-6FB4-446D-A692-9BC018882298}"
20-
EndProject
2134
Global
2235
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2336
Debug|Any CPU = Debug|Any CPU
@@ -36,6 +49,12 @@ Global
3649
GlobalSection(SolutionProperties) = preSolution
3750
HideSolutionNode = FALSE
3851
EndGlobalSection
52+
GlobalSection(NestedProjects) = preSolution
53+
{FD920B11-BA4F-4781-BD56-56CF362982CF} = {8A1A1535-2928-4313-9AFC-9CA1892426E3}
54+
{95A1410C-6FB4-446D-A692-9BC018882298} = {F7C842B8-9D5C-4AF6-9F8B-779E1DEEEDC2}
55+
{D549CC35-5318-45B0-ACCD-F28C543E482C} = {4181FF50-7335-4293-8EE4-66E0C47C736E}
56+
{8EDBC8F3-0169-4422-B44F-92AD9B9C8D5B} = {4181FF50-7335-4293-8EE4-66E0C47C736E}
57+
EndGlobalSection
3958
GlobalSection(ExtensibilityGlobals) = postSolution
4059
SolutionGuid = {96B5A6F7-D0A4-4A34-890A-59E971AC4E94}
4160
EndGlobalSection

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# FileUtil [![Build Status](https://travis-ci.org/NinjaRocks/FileUtil.Core.svg?branch=master)](https://travis-ci.org/NinjaRocks/FileUtil.Core) [![NuGet version](https://badge.fury.io/nu/FixedWidth.FileParser.svg)](https://badge.fury.io/nu/FixedWidth.FileParser) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/NinjaRocks/FileUtil.Core/blob/master/LICENSE)
2-
.Net Library to read from fixed width or delimiter separated file using strongly typed objects.
3-
4-
1+
# FileUtil
2+
[![NuGet version](https://badge.fury.io/nu/FileUtil.Core.svg)](https://badge.fury.io/nu/FileUtil.Core) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/NinjaRocks/FileUtil.Core/blob/master/License.md) [![CI](https://github.com/NinjaRocks/FileUtil.Core/actions/workflows/CI-Build.yml/badge.svg)](https://github.com/NinjaRocks/FileUtil.Core/actions/workflows/CI-Build.yml) [![GitHub Release](https://img.shields.io/github/v/release/ninjarocks/FileUtil.Core?logo=github&sort=semver)](https://github.com/ninjarocks/FileUtil.Core/releases/latest)
3+
[![CodeQL](https://github.com/NinjaRocks/FileUtil.Core/actions/workflows/codeql.yml/badge.svg)](https://github.com/NinjaRocks/FileUtil.Core/actions/workflows/codeql.yml) [![.Net Stardard](https://img.shields.io/badge/.Net%20Standard-2.1-blue)](https://dotnet.microsoft.com/en-us/download/dotnet/2.1)
54
-------------
5+
.Net Library to read from fixed width or delimiter separated file using strongly typed objects.
66

77

88
**Fixed Width or Delimiter Separated File**

ninja-icon-16.png

15.3 KB
Loading
+25-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,39 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netstandard2.0</TargetFramework>
3+
<TargetFramework>netstandard2.1</TargetFramework>
44
<RepositoryType>Public</RepositoryType>
55
<RepositoryUrl>https://github.com/NinjaRocks/FileUtil.Core</RepositoryUrl>
6-
<PackageTags>csv fixed width file delimiter parser</PackageTags>
6+
<PackageTags>csv fixed-width delimiter-file delimiter file-parser file parser</PackageTags>
77
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
88
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
99
<Description>.Net Library to read from fixed width or delimiter separated file using strongly typed objects.
1010
Example: pipe delimited, csv, etc.</Description>
11-
<PackageLicenseUrl>https://github.com/NinjaRocks/FileUtil.Core/blob/master/License.md</PackageLicenseUrl>
12-
<NeutralLanguage>en-GB</NeutralLanguage>
11+
<NeutralLanguage>en-GB</NeutralLanguage>
1312
<Company>Ninja Corp</Company>
14-
<Authors>Najaf Shayk</Authors>
13+
<Authors>Ninja Shayk</Authors>
1514
<PackageId>FixedWidth.FileParser</PackageId>
1615
<Product>Fixed Width File Parser</Product>
1716
<PackageProjectUrl>https://github.com/NinjaRocks/FileUtil.Core</PackageProjectUrl>
1817
<PackageIconUrl>https://1drv.ms/u/s!Aq_ncig7TU4551b5fzxOad-pDMfL</PackageIconUrl>
19-
<Version>1.1.0</Version>
18+
<Version>1.1.1</Version>
19+
<Title>FixedWidth.FileParser</Title>
20+
<Copyright>© Copyright 2016 Ninja Sha!4h.</Copyright>
21+
<PackageIcon>ninja-icon-16.png</PackageIcon>
22+
<PackageReadmeFile>README.md</PackageReadmeFile>
23+
<PackageLicenseFile>License.md</PackageLicenseFile>
2024
</PropertyGroup>
25+
<ItemGroup>
26+
<None Include="..\..\License.md">
27+
<Pack>True</Pack>
28+
<PackagePath>\</PackagePath>
29+
</None>
30+
<None Include="..\..\ninja-icon-16.png">
31+
<Pack>True</Pack>
32+
<PackagePath>\</PackagePath>
33+
</None>
34+
<None Include="..\..\README.md">
35+
<Pack>True</Pack>
36+
<PackagePath>\</PackagePath>
37+
</None>
38+
</ItemGroup>
2139
</Project>

0 commit comments

Comments
 (0)