Skip to content

Commit 37290cc

Browse files
engineering87iscifoniIvano ScifoniVforValerioBIvano Scifoni
authored
Upgrade to .NET Standard 2.1 (#29)
* Fix FromByteArrayTo method * Update MSTest packages * Branch align from master (#19) * Add library version on props file Add library sign * Align from Develop (#15) * DictionaryHelper - Test WIP * New String Method ToInt32 * method ToInt32 modified with CulureInfo as input value - default is currentculture * Fixed StringTest * Create nuget.config * Update dotnetcore.yml * Update version.json Co-authored-by: VforValerioB <[email protected]> * Update version.json * Update version.json * DictionaryHelper - Test WIP * New String Method ToInt32 * method ToInt32 modified with CulureInfo as input value - default is currentculture * Fixed StringTest * Create nuget.config * Update dotnetcore.yml * Update version.json * Set version to '1.0' Co-authored-by: VforValerioB <[email protected]> * Update README.md * Update README.md * Fix FromByteArrayTo method * Update MSTest packages Co-authored-by: Ivano Scifoni <[email protected]> Co-authored-by: VforValerioB <[email protected]> Co-authored-by: engineering87 <[email protected]> * Add DataTable helper * Add ToList in DataTableHelper * Add RemoveDigits | OnlyDigits methods * Develop (#24) (#25) * Fix FromByteArrayTo method * Update MSTest packages * Branch align from master (#19) * Add library version on props file Add library sign * Align from Develop (#15) * DictionaryHelper - Test WIP * New String Method ToInt32 * method ToInt32 modified with CulureInfo as input value - default is currentculture * Fixed StringTest * Create nuget.config * Update dotnetcore.yml * Update version.json Co-authored-by: VforValerioB <[email protected]> * Update version.json * V1.0 (#16) * DictionaryHelper - Test WIP * New String Method ToInt32 * method ToInt32 modified with CulureInfo as input value - default is currentculture * Fixed StringTest * Create nuget.config * Update dotnetcore.yml * Update version.json * Set version to '1.0' Co-authored-by: VforValerioB <[email protected]> * Update README.md * Update README.md * Fix FromByteArrayTo method * Update MSTest packages Co-authored-by: Ivano Scifoni <[email protected]> Co-authored-by: VforValerioB <[email protected]> Co-authored-by: engineering87 <[email protected]> * Add DataTable helper * Add ToList in DataTableHelper * Add RemoveDigits | OnlyDigits methods Co-authored-by: engineering87 <[email protected]> Co-authored-by: Ivano Scifoni <[email protected]> Co-authored-by: VforValerioB <[email protected]> Co-authored-by: engineering87 <[email protected]> Co-authored-by: Ivano Scifoni <[email protected]> Co-authored-by: VforValerioB <[email protected]> * Update README.md * Update wfnetcorev2.yaml * Update wfnetcorev2.yaml * Update dotnetcore.yml * Update wfnetcorev2.yaml * Update wfnetcorev2.yaml * Update wfnetcorev2.yaml * Update wfnetcorev2.yaml * Update wfnetcorev2.yaml * Update README.md * Upgrade to .NET Standard 2.1 * Update README.md * removed gitversion * Update wfnetcorev2.yaml * update csproj * removed gitversion from direcoty.build.props --------- Co-authored-by: ivano scifoni <[email protected]> Co-authored-by: Ivano Scifoni <[email protected]> Co-authored-by: VforValerioB <[email protected]> Co-authored-by: Ivano Scifoni <[email protected]>
1 parent fb139e0 commit 37290cc

File tree

5 files changed

+51
-34
lines changed

5 files changed

+51
-34
lines changed

.github/workflows/wfnetcorev2.yaml

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
GITHUB_FEED: https://nuget.pkg.github.com/shaprcode-it/
1717
GITHUB_USER: iscifoni
1818
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
PERSONAL_TOKEN: ${{ secrets.PACKAGESTOKEN }}
1920
# Official NuGet Feed settings
2021
NUGET_FEED: https://api.nuget.org/v3/index.json
2122
NUGET_KEY: ${{ secrets.NUGET_TOKEN }}
@@ -27,16 +28,22 @@ jobs:
2728
os: [ ubuntu-latest, windows-latest ]
2829
steps:
2930
- name: Checkout
30-
uses: actions/checkout@v2
31+
uses: actions/checkout@v3
3132
- run: git fetch --unshallow
3233
- name: Setup .NET Core 3.1
33-
uses: actions/setup-dotnet@v1
34+
uses: actions/setup-dotnet@v3
3435
with:
3536
dotnet-version: 3.1.100
37+
source-url: https://nuget.pkg.github.com/shaprcode-it/index.json
38+
env:
39+
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
3640
- name: Setup .NET Core 2.2
37-
uses: actions/setup-dotnet@v1
41+
uses: actions/setup-dotnet@v3
3842
with:
3943
dotnet-version: 2.2.402
44+
source-url: https://nuget.pkg.github.com/shaprcode-it/index.json
45+
env:
46+
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
4047
- name: Install GitVersion
4148
uses: gittools/actions/gitversion/setup@v0
4249
with:
@@ -58,36 +65,50 @@ jobs:
5865
run: dotnet pack -v normal -c Release --no-restore --no-build -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }}-${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }} ./SharpHelpers/SharpHelpers.sln
5966
- name: Upload Artifact
6067
if: matrix.os == 'ubuntu-latest'
61-
uses: actions/upload-artifact@v2
68+
uses: actions/upload-artifact@v3
6269
with:
6370
name: nupkg
6471
path: ./SharpHelpers/${{ env.PROJECT_NAME }}/bin/Release/*.nupkg
6572
prerelease:
6673
needs: build
6774
if: github.ref == 'refs/heads/develop'
6875
runs-on: ubuntu-latest
76+
permissions: write-all
6977
steps:
7078
- name: Download Artifact
71-
uses: actions/download-artifact@v1
79+
uses: actions/download-artifact@v3
7280
with:
7381
name: nupkg
74-
- name: Push to GitHub Feed
75-
run: |
76-
for f in ./nupkg/*.nupkg
77-
do
78-
echo $f
79-
curl --silent --show-error --fail -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED
80-
done
82+
- name: Display structure of downloaded files
83+
run: ls -R
84+
- name: Setup .NET Core
85+
uses: actions/setup-dotnet@v3
86+
with:
87+
dotnet-version: 7.x
88+
# source-url: https://nuget.pkg.github.com/shaprcode-it/index.json
89+
# - name: Add Github feed
90+
# run: dotnet nuget add source --username iscifoni --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/shaprcode-it/index.json"
91+
# - name: List sources
92+
# run: dotnet nuget list source
93+
# - name: Push to GitHub Feed
94+
# run: |
95+
# for f in *.nupkg
96+
# do
97+
# curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED
98+
# done
99+
- name: Publish the package to GitHub
100+
run: dotnet nuget push "*.nupkg" --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --api-key ${{ secrets.GITHUB_TOKEN }}
81101
deploy:
82102
needs: build
83103
if: github.event_name == 'release' && startsWith(github.ref, 'refs/heads/v')
84104
runs-on: ubuntu-latest
85105
steps:
86-
- uses: actions/checkout@v2
106+
- uses: actions/checkout@v3
87107
- name: Setup .NET Core
88-
uses: actions/setup-dotnet@v1
108+
uses: actions/setup-dotnet@v3
89109
with:
90-
dotnet-version: 5.0.100
110+
dotnet-version: 7.x
111+
source-url: https://nuget.pkg.github.com/shaprcode-it/index.json
91112
- name: Create Release NuGet package
92113
run: |
93114
arrTag=(${GITHUB_REF//\// })
@@ -96,11 +117,13 @@ jobs:
96117
VERSION="${VERSION//v}"
97118
echo Clean Version: $VERSION
98119
dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg src/$PROJECT_NAME/$PROJECT_NAME.*proj
99-
- name: Push to GitHub Feed
100-
run: |
101-
for f in ./nupkg/*.nupkg
102-
do
103-
curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED
104-
done
120+
# - name: Push to GitHub Feed
121+
# run: |
122+
# for f in ./nupkg/*.nupkg
123+
# do
124+
# curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED
125+
# done
126+
- name: Publish the package to GitHub
127+
run: dotnet nuget push "*.nupkg" --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --api-key ${{ secrets.GITHUB_TOKEN }}
105128
- name: Push to NuGet Feed
106129
run: dotnet nuget push ./nupkg/*.nupkg --source $NUGET_FEED --skip-duplicate --api-key $NUGET_KEY

Directory.Build.props

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,4 @@
33
<PropertyGroup>
44
<LangVersion>8.0</LangVersion>
55
</PropertyGroup>
6-
<ItemGroup>
7-
<PackageReference Include="Nerdbank.GitVersioning">
8-
<Version>3.0.28</Version>
9-
<PrivateAssets>all</PrivateAssets>
10-
</PackageReference>
11-
</ItemGroup>
126
</Project>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
|Version|Status|
44
|:-:|:-:|
5-
|Develop|![.NET Core](https://github.com/sharpcode-it/SharpHelpers/workflows/.NET%20Core/badge.svg?branch=develop)|
5+
|Develop|[![.NET Core V2](https://github.com/sharpcode-it/SharpHelpers/actions/workflows/wfnetcorev2.yaml/badge.svg?branch=develop)](https://github.com/sharpcode-it/SharpHelpers/actions/workflows/wfnetcorev2.yaml)|
66
|Master|![.NET Core](https://github.com/sharpcode-it/SharpHelpers/workflows/.NET%20Core/badge.svg?branch=master)|
77
|v1.0|![.NET Core](https://github.com/sharpcode-it/SharpHelpers/workflows/.NET%20Core/badge.svg?branch=v1.0)|
88

SharpHelpers/SharpHelpers.UnitTest/SharpHelpers.UnitTest.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.2</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
11-
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
12-
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
11+
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
12+
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

SharpHelpers/SharpHelpers/SharpHelpers.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\build\version.props" />
33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFramework>netstandard2.1</TargetFramework>
55
<RootNamespace>SharpCoding.SharpHelpers</RootNamespace>
66
<Authors>SharpCoding</Authors>
77
<Company>SharpCoding</Company>
@@ -21,7 +21,7 @@
2121
<PackageIconUrl />
2222
</PropertyGroup>
2323
<ItemGroup>
24-
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
24+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
2525
</ItemGroup>
2626

2727
<ItemGroup>

0 commit comments

Comments
 (0)