Skip to content

Commit 1d8a4e8

Browse files
committed
Custom package build.
1 parent 232af8d commit 1d8a4e8

File tree

5 files changed

+36
-30
lines changed

5 files changed

+36
-30
lines changed

Diff for: .github/workflows/publish.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*' # Trigger the workflow when a new version tag is pushed
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v3
13+
14+
- name: Setup .NET
15+
uses: actions/setup-dotnet@v3
16+
with:
17+
dotnet-version: '6.0.x'
18+
19+
- name: Restore dependencies
20+
run: dotnet restore
21+
22+
- name: Build the project
23+
run: dotnet build --configuration Release ./NBitcoin/NBitcoin.csproj --no-restore --framework net6.0
24+
25+
- name: Pack the project
26+
run: dotnet pack --configuration Release ./NBitcoin/NBitcoin.csproj --no-build --output ./output
27+
28+
- name: Publish to GitHub Packages
29+
run: dotnet nuget push ./output/*.nupkg --api-key ${{ secrets.GH_PACKAGES_TOKEN }} --source https://nuget.pkg.github.com/nofrixion/index.json
30+
# env:
31+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Optional, for GitHub authentication

Diff for: NBitcoin.Secp256k1/NBitcoin.Secp256k1.csproj

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<RepositoryType>git</RepositoryType>
1212
</PropertyGroup>
1313
<PropertyGroup>
14-
<TargetFrameworks>net6.0;netstandard2.1</TargetFrameworks>
14+
<TargetFrameworks>net6.0</TargetFrameworks>
1515
<Version Condition=" '$(Version)' == '' ">3.1.5</Version>
1616
</PropertyGroup>
1717
<PropertyGroup>

Diff for: NBitcoin.Tests/NBitcoin.Tests.csproj

100644100755
-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
<PackageReference Include="FsCheck.Xunit" Version="2.13.0" />
3939
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
4040
<ProjectReference Include="..\NBitcoin\NBitcoin.csproj" />
41-
<ProjectReference Include="..\NBitcoin.Altcoins\NBitcoin.Altcoins.csproj" />
4241
<ProjectReference Include="..\NBitcoin.TestFramework\NBitcoin.TestFramework.csproj" />
4342
<PackageReference Include="Microsoft.CSharp" Version="4.6.0" />
4443
<PackageReference Include="xunit" Version="2.4.1" />

Diff for: NBitcoin.sln

+2-26
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio Version 16
3-
VisualStudioVersion = 16.0.29519.181
2+
# Visual Studio Version 17
3+
VisualStudioVersion = 17.10.34928.147
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBitcoin", "NBitcoin\NBitcoin.csproj", "{7B692A4C-412A-41BA-A1F8-5DF8F7450ABC}"
66
EndProject
7-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBitcoin.Tests", "NBitcoin.Tests\NBitcoin.Tests.csproj", "{9F7C1BCF-0BCE-41D3-9DF3-D4939A98636D}"
8-
EndProject
9-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBitcoin.Altcoins", "NBitcoin.Altcoins\NBitcoin.Altcoins.csproj", "{3588C2BF-783C-4DBF-ADBC-16C78B8B109A}"
10-
EndProject
11-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBitcoin.TestFramework", "NBitcoin.TestFramework\NBitcoin.TestFramework.csproj", "{653C0F21-25FE-4B72-95AC-20D070A45415}"
12-
EndProject
13-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBitcoin.Bench", "NBitcoin.Bench\NBitcoin.Bench.csproj", "{153FEA8A-FA98-4ADD-8570-5FD88631C489}"
14-
EndProject
157
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBitcoin.Secp256k1", "NBitcoin.Secp256k1\NBitcoin.Secp256k1.csproj", "{6E105AA4-767F-4045-B858-A7C400DCBC40}"
168
EndProject
179
Global
@@ -24,22 +16,6 @@ Global
2416
{7B692A4C-412A-41BA-A1F8-5DF8F7450ABC}.Debug|Any CPU.Build.0 = Debug|Any CPU
2517
{7B692A4C-412A-41BA-A1F8-5DF8F7450ABC}.Release|Any CPU.ActiveCfg = Release|Any CPU
2618
{7B692A4C-412A-41BA-A1F8-5DF8F7450ABC}.Release|Any CPU.Build.0 = Release|Any CPU
27-
{9F7C1BCF-0BCE-41D3-9DF3-D4939A98636D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28-
{9F7C1BCF-0BCE-41D3-9DF3-D4939A98636D}.Debug|Any CPU.Build.0 = Debug|Any CPU
29-
{9F7C1BCF-0BCE-41D3-9DF3-D4939A98636D}.Release|Any CPU.ActiveCfg = Release|Any CPU
30-
{9F7C1BCF-0BCE-41D3-9DF3-D4939A98636D}.Release|Any CPU.Build.0 = Release|Any CPU
31-
{3588C2BF-783C-4DBF-ADBC-16C78B8B109A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32-
{3588C2BF-783C-4DBF-ADBC-16C78B8B109A}.Debug|Any CPU.Build.0 = Debug|Any CPU
33-
{3588C2BF-783C-4DBF-ADBC-16C78B8B109A}.Release|Any CPU.ActiveCfg = Release|Any CPU
34-
{3588C2BF-783C-4DBF-ADBC-16C78B8B109A}.Release|Any CPU.Build.0 = Release|Any CPU
35-
{653C0F21-25FE-4B72-95AC-20D070A45415}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36-
{653C0F21-25FE-4B72-95AC-20D070A45415}.Debug|Any CPU.Build.0 = Debug|Any CPU
37-
{653C0F21-25FE-4B72-95AC-20D070A45415}.Release|Any CPU.ActiveCfg = Release|Any CPU
38-
{653C0F21-25FE-4B72-95AC-20D070A45415}.Release|Any CPU.Build.0 = Release|Any CPU
39-
{153FEA8A-FA98-4ADD-8570-5FD88631C489}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40-
{153FEA8A-FA98-4ADD-8570-5FD88631C489}.Debug|Any CPU.Build.0 = Debug|Any CPU
41-
{153FEA8A-FA98-4ADD-8570-5FD88631C489}.Release|Any CPU.ActiveCfg = Release|Any CPU
42-
{153FEA8A-FA98-4ADD-8570-5FD88631C489}.Release|Any CPU.Build.0 = Release|Any CPU
4319
{6E105AA4-767F-4045-B858-A7C400DCBC40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4420
{6E105AA4-767F-4045-B858-A7C400DCBC40}.Debug|Any CPU.Build.0 = Debug|Any CPU
4521
{6E105AA4-767F-4045-B858-A7C400DCBC40}.Release|Any CPU.ActiveCfg = Release|Any CPU

Diff for: NBitcoin/NBitcoin.csproj

100644100755
+2-2
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<RepositoryType>git</RepositoryType>
1313
</PropertyGroup>
1414
<PropertyGroup>
15-
<Version Condition=" '$(Version)' == '' ">7.0.38</Version>
15+
<Version Condition=" '$(Version)' == '' ">0.0.1</Version>
1616
<LangVersion>9.0</LangVersion>
1717
</PropertyGroup>
1818
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
1919
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2020
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2121
</PropertyGroup>
2222
<PropertyGroup>
23-
<TargetFrameworks>net472;netstandard1.3;netstandard1.1;netstandard2.1;netstandard2.0;net6.0</TargetFrameworks>
23+
<TargetFrameworks>net6.0</TargetFrameworks>
2424
<TargetFrameworks Condition="'$(TargetFrameworkOverride)' != ''">$(TargetFrameworkOverride)</TargetFrameworks>
2525
<NoWarn>1591;1573;1572;1584;1570;3021</NoWarn>
2626
<GenerateDocumentationFile>true</GenerateDocumentationFile>

0 commit comments

Comments
 (0)