Skip to content

Commit 4ed99ee

Browse files
- add tool publishing
Signed-off-by: Lena Tauchner <lena.tauchner@rubicon.eu>
1 parent e7b6ea2 commit 4ed99ee

5 files changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ jobs:
6767
dotnet publish src/cyclonedx/cyclonedx.csproj -r $runtime --configuration Release /p:Version=$VERSION --self-contained true /p:PublishSingleFile=true /p:IncludeNativeLibrariesInSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --output bin/$runtime
6868
done
6969
70+
dotnet pack src/cyclonedx/cyclonedx.csproj --configuration Release /p:Version=$VERSION /p:PackageOutputPath=bin/nuget
71+
dotnet nuget push bin/nuget/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
72+
7073
docker login --username coderpatros --password "$DOCKER_TOKEN"
7174
docker buildx build \
7275
--sbom=true \

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<RepositoryType>git</RepositoryType>
2121
<RepositoryUrl>https://github.com/CycloneDX/cyclonedx-cli.git</RepositoryUrl>
2222
<EmbedUntrackedSources>true</EmbedUntrackedSources>
23+
<PackageVersion>$(VersionSuffix)</PackageVersion>
2324
<!-- <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> -->
2425
<!-- <RestoreLockedMode>true</RestoreLockedMode> -->
2526
</PropertyGroup>

nuget.config

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
5+
</packageSources>
6+
</configuration>
7+

src/cyclonedx/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[cyclonedx-cli project README.md](https://github.com/CycloneDX/cyclonedx-cli/blob/master/README.md)

src/cyclonedx/cyclonedx.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net8.0</TargetFramework>
66
<!-- <PublishTrimmed>true</PublishTrimmed>-->
7+
<PackAsTool>true</PackAsTool>
8+
<ToolCommandName>dotnet-CycloneDX-cli</ToolCommandName>
9+
<PackageId>CycloneDX.CLI</PackageId>
10+
<PackageReadmeFile>README.md</PackageReadmeFile>
11+
<PackageDescription>A command line tool for interacting with CycloneDX bill-of-material documents.</PackageDescription>
712
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
813
<RuntimeIdentifiers>linux-x64;linux-musl-x64;linux-arm;linux-arm64;win-x64;win-x86;win-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
914
</PropertyGroup>
@@ -22,5 +27,9 @@
2227
<PackageReference Include="System.Security.Cryptography.Xml" Version="6.0.1" />
2328
</ItemGroup>
2429

30+
<ItemGroup>
31+
<None Include="README.md" Pack="true" PackagePath="" Condition="Exists('README.md')" />
32+
</ItemGroup>
33+
2534
</Project>
2635

0 commit comments

Comments
 (0)