Skip to content

Commit 6aea4de

Browse files
authored
Feature/#147 fix nuget issue (#148)
* #147 fix nuget issue * #147 fix code coverage permission issue * #147 fix version issues * #147 version issue refix * #147 retry fix version issue * #147 retry fixing * #147 fix more issues with pipeline * #147 revert back still issue * #147 version fix * #147 fix preview pipeline * #147 final fix * #147 fix nuget issue * #147 fix nuget issues * #147 fix reference ExtShared * #147 update and test latest packages * #147 adding consumber project * #147 update doc * #147 fix documentaiton genrators prev error on none existing folder
1 parent d2c5088 commit 6aea4de

File tree

17 files changed

+103
-65
lines changed

17 files changed

+103
-65
lines changed

.github/workflows/cd-release-preview.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ name: "2. Continuous Deployment (Release Preview)"
33
on:
44
push:
55
tags:
6-
- "v[0-9]+\\.[0-9]+\\.[0-9]+-preview[0-9]+\\.[0-9]+"
6+
- "v[0-9]+\\.[0-9]+\\.[0-9]+-preview.*"
77

88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11-
1211
timeout-minutes: 15
1312

1413
steps:

.github/workflows/cd-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "2. Continuous Deployment (Release)"
1+
name: "2. Continuous Deployment (Release)"
22

33
on:
44
push:

.github/workflows/code-coverage.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: "3. Code Coverage"
22

3+
permissions:
4+
contents: write
5+
36
on:
47
push:
58
branches:
@@ -22,6 +25,7 @@ jobs:
2225
with:
2326
ref: ${{ github.ref }}
2427
fetch-depth: 0
28+
token: ${{ secrets.GITHUB_TOKEN }}
2529

2630
- name: Setup .NET
2731
uses: actions/setup-dotnet@v4
@@ -55,25 +59,22 @@ jobs:
5559
name: code-coverage-badge
5660
path: coverage/badge_linecoverage.svg
5761

58-
- name: Commit coverage badge
62+
- name: Commit coverage badge (only on main)
63+
if: github.ref == 'refs/heads/main'
5964
run: |
60-
git config --global user.name 'github-actions[bot]'
61-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
65+
git config --global user.name "github-actions[bot]"
66+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
6267
6368
# Copy badge to root directory
64-
find . -name badge_linecoverage.svg || echo "Badge not found"
6569
cp coverage/badge_linecoverage.svg ./coverage-badge.svg
6670
67-
# Force add badge and commit
68-
git add -f coverage-badge.svg
69-
if git diff-index --cached --quiet HEAD; then
70-
echo "No changes to commit"
71+
git add coverage-badge.svg
72+
if git diff --cached --quiet; then
73+
echo "No changes to commit"
7174
else
72-
git commit -m 'Update coverage badge'
73-
git push --force
75+
git commit -m "Update coverage badge"
76+
git push
7477
fi
75-
env:
76-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7778
7879
- name: Print Directory Structure
7980
uses: FiorelaCiroku/[email protected]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="CryptoNet" Version="3.0.25-preview.20250822.1051" />
12+
</ItemGroup>
13+
14+
</Project>

CryptoNet.ConsumerTest/Program.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace CryptoNet.ConsumerTest
2+
{
3+
internal class Program
4+
{
5+
static void Main(string[] args)
6+
{
7+
Console.WriteLine("This is only to test if the latest Nuget package is consumable for nuget.net");
8+
//todo: implement a test that uses the CryptoNet library
9+
}
10+
}
11+
}

CryptoNet.ExtShared/CryptoNet.ExtShared.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
12-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" PrivateAssets="All" />
13-
<PackageReference Include="System.Text.Json" Version="8.0.5" />
12+
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0" PrivateAssets="All" />
13+
<PackageReference Include="System.Text.Json" Version="9.0.8" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

CryptoNet.UnitTests/CryptoNet.UnitTests.csproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
12+
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
<PrivateAssets>all</PrivateAssets>
1515
</PackageReference>
16-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
17-
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Core" Version="8.0.7" />
16+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
17+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Core" Version="9.0.0" />
1818
<PackageReference Include="Moq" Version="4.20.72" />
19-
<PackageReference Include="NUnit" Version="4.3.2" />
20-
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
21-
<PackageReference Include="coverlet.collector" Version="6.0.2">
19+
<PackageReference Include="NUnit" Version="4.4.0" />
20+
<PackageReference Include="NUnit3TestAdapter" Version="5.1.0" />
21+
<PackageReference Include="coverlet.collector" Version="6.0.4">
2222
<PrivateAssets>all</PrivateAssets>
2323
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2424
</PackageReference>
25-
<PackageReference Include="ReportGenerator" Version="5.4.3" />
26-
<PackageReference Include="Shouldly" Version="4.2.1" />
27-
<PackageReference Include="SharperHacks.CoreLibs.IO" Version="5.0.2" />
28-
<PackageReference Include="System.Text.Json" Version="8.0.5" />
25+
<PackageReference Include="ReportGenerator" Version="5.4.12" />
26+
<PackageReference Include="Shouldly" Version="4.3.0" />
27+
<PackageReference Include="SharperHacks.CoreLibs.IO" Version="7.0.3" />
28+
<PackageReference Include="System.Text.Json" Version="9.0.8" />
2929
</ItemGroup>
3030

3131
<ItemGroup>

CryptoNet.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DevOps", "DevOps", "{1733D1
1212
.gitattributes = .gitattributes
1313
.gitignore = .gitignore
1414
build.ps1 = build.ps1
15+
.github\workflows\cd-release-preview.yml = .github\workflows\cd-release-preview.yml
1516
.github\workflows\cd-release.yml = .github\workflows\cd-release.yml
1617
.github\workflows\ci.yml = .github\workflows\ci.yml
1718
.github\workflows\code-coverage.yml = .github\workflows\code-coverage.yml
@@ -47,6 +48,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Examples.UnitTests", "Examp
4748
EndProject
4849
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DSAExample", "Examples\DSAExample\DSAExample.csproj", "{7338899C-D3F0-4268-AAE8-45793979D936}"
4950
EndProject
51+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CryptoNet.ConsumerTest", "CryptoNet.ConsumerTest\CryptoNet.ConsumerTest.csproj", "{6BBC4487-140E-44E1-9703-F9F48E805589}"
52+
EndProject
5053
Global
5154
GlobalSection(SolutionConfigurationPlatforms) = preSolution
5255
Debug|Any CPU = Debug|Any CPU
@@ -89,6 +92,10 @@ Global
8992
{7338899C-D3F0-4268-AAE8-45793979D936}.Debug|Any CPU.Build.0 = Debug|Any CPU
9093
{7338899C-D3F0-4268-AAE8-45793979D936}.Release|Any CPU.ActiveCfg = Release|Any CPU
9194
{7338899C-D3F0-4268-AAE8-45793979D936}.Release|Any CPU.Build.0 = Release|Any CPU
95+
{6BBC4487-140E-44E1-9703-F9F48E805589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
96+
{6BBC4487-140E-44E1-9703-F9F48E805589}.Debug|Any CPU.Build.0 = Debug|Any CPU
97+
{6BBC4487-140E-44E1-9703-F9F48E805589}.Release|Any CPU.ActiveCfg = Release|Any CPU
98+
{6BBC4487-140E-44E1-9703-F9F48E805589}.Release|Any CPU.Build.0 = Release|Any CPU
9299
EndGlobalSection
93100
GlobalSection(SolutionProperties) = preSolution
94101
HideSolutionNode = FALSE

CryptoNet/CryptoNet.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
4747
</Content>
4848
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
49-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" PrivateAssets="All" />
50-
<PackageReference Include="System.Text.Json" Version="8.0.5" />
49+
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0" PrivateAssets="All" />
50+
<PackageReference Include="System.Text.Json" Version="9.0.8" />
5151
</ItemGroup>
5252

5353
<ItemGroup>
@@ -59,8 +59,8 @@
5959
</ItemGroup>
6060

6161
<ItemGroup>
62-
<ProjectReference Include="..\CryptoNet.ExtShared\CryptoNet.ExtShared.csproj" />
63-
<ProjectReference Include="..\CryptoNet.Models\CryptoNet.Models.csproj" />
62+
<ProjectReference Include="..\CryptoNet.ExtShared\CryptoNet.ExtShared.csproj" PrivateAssets="all" />
63+
<ProjectReference Include="..\CryptoNet.Models\CryptoNet.Models.csproj" PrivateAssets="all" />
6464
</ItemGroup>
6565

6666
</Project>

Examples/AESExample/AESExample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="System.Text.Json" Version="8.0.5" />
12+
<PackageReference Include="System.Text.Json" Version="9.0.8" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

0 commit comments

Comments
 (0)