Skip to content

Commit

Permalink
Fixed Workflow for nuget publish (#1040)
Browse files Browse the repository at this point in the history
* Updated framework to fix workflow

* make packable

* fix workflow for dotnet format and change path for publish nuget

* Fixed workflow

* Fixed pathing

* Fixed sourcing
  • Loading branch information
cschuchardt88 authored May 20, 2024
1 parent b65b43f commit a2de77d
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 37 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,13 @@ jobs:
- name: Publish to NuGet
if: steps.check_tag.outputs.statusCode == '404'
run: |
dotnet pack -o out -c Release
dotnet nuget push "out/*.nupkg" -s https://api.nuget.org/v3/index.json -k ${NUGET_TOKEN} --skip-duplicate
dotnet sln neo-devpack-dotnet.sln remove ./neo/src/neo/neo.csproj
dotnet sln neo-devpack-dotnet.sln remove ./neo/src/Neo.Cryptography.BLS12_381/Neo.Cryptography.BLS12_381.csproj
dotnet sln neo-devpack-dotnet.sln remove ./neo/src/Neo.Extensions/Neo.Extensions.csproj
dotnet sln neo-devpack-dotnet.sln remove ./neo/src/Neo.IO/Neo.IO.csproj
dotnet sln neo-devpack-dotnet.sln remove ./neo/src/Neo.Json/Neo.Json.csproj
dotnet sln neo-devpack-dotnet.sln remove ./neo/src/Neo.VM/Neo.VM.csproj
dotnet pack -o pub -c Release
dotnet nuget push "pub/*.nupkg" -s https://api.nuget.org/v3/index.json -k ${NUGET_TOKEN} --skip-duplicate
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

<PropertyGroup>
<Copyright>2015-2024 The Neo Project</Copyright>
<Company>The Neo Project</Company>
<VersionPrefix>3.7.1</VersionPrefix>
<TargetFramework>net8.0</TargetFramework>
<Authors>The Neo Project</Authors>
<PackageProjectUrl>https://github.com/neo-project/neo-devpack-dotnet</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
1 change: 1 addition & 0 deletions src/Neo.Compiler.CSharp/Neo.Compiler.CSharp.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<AssemblyTitle>Neo.Compiler.CSharp</AssemblyTitle>
<AssemblyName>nccs</AssemblyName>
<OutputType>Exe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net8.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<IsRoslynComponent>true</IsRoslynComponent>
<RootNamespace>Neo.SmartContract.Analyzer</RootNamespace>
<PackageId>Neo.SmartContract.Analyzer</PackageId>
<PackAsTool>true</PackAsTool>
<RootNamespace>Neo.SmartContract.Analyzer</RootNamespace>
<PackageTags>NEO;Blockchain;Smart Contract;Analyzer</PackageTags>
<PackageProjectUrl>https://github.com/neo-project/neo-devpack-dotnet</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/neo-project/neo-devpack-dotnet.git</RepositoryUrl>
<Company>The Neo Project</Company>
<Product>Neo.SmartContract.Analyzer.CSharp</Product>
<Description>Neo.SmartContract.Analyzer.CSharp</Description>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<AssemblyTitle>Neo.SmartContract.Framework</AssemblyTitle>
<AssemblyName>Neo.SmartContract.Framework</AssemblyName>
<PackageId>Neo.SmartContract.Framework</PackageId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<Title>Neo.SmartContract.Template</Title>
<PackageType>Template</PackageType>
<PackageId>Neo.SmartContract.Template</PackageId>
Expand Down
55 changes: 29 additions & 26 deletions src/Neo.SmartContract.Testing/Neo.SmartContract.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Title>Neo.SmartContract.Testing</Title>
<TargetFrameworks>netstandard2.1;net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<PackageId>Neo.SmartContract.Testing</PackageId>
<PackageTags>NEO;Blockchain;Smart Contract</PackageTags>
<Description>TestEngine for NEO smart contract testing.</Description>
<IncludeContentInPack>true</IncludeContentInPack>
<ContentTargetFolders>content</ContentTargetFolders>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);NU5128</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
<PackageReference Include="ReportGenerator.Core" Version="5.2.4" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\neo\src\Neo\Neo.csproj" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net8.0</TargetFrameworks>
<Title>Neo.SmartContract.Testing</Title>
<LangVersion>latest</LangVersion>
<AssemblyTitle>Neo.SmartContract.Testing</AssemblyTitle>
<AssemblyName>Neo.SmartContract.Testing</AssemblyName>
<RootNamespace>Neo.SmartContract.Testing</RootNamespace>
<PackageId>Neo.SmartContract.Testing</PackageId>
<PackageTags>NEO;Blockchain;Smart Contract</PackageTags>
<Description>TestEngine for NEO smart contract testing.</Description>
<IncludeContentInPack>true</IncludeContentInPack>
<ContentTargetFolders>content</ContentTargetFolders>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);NU5128</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
<PackageReference Include="ReportGenerator.Core" Version="5.2.4" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\neo\src\Neo\Neo.csproj" />
</ItemGroup>

</Project>

0 comments on commit a2de77d

Please sign in to comment.