Skip to content

Commit 963e2fd

Browse files
Added nuspec; version added from workflow through csproj params (LEGO#15)
* package both AsyncAPI and AsyncAPI.Readers projects
1 parent 0f6467e commit 963e2fd

File tree

4 files changed

+48
-7
lines changed

4 files changed

+48
-7
lines changed

.github/workflows/release-package.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Publish a NuGet package
22
on:
33
push:
44
branches: [ main ]
5-
paths:
5+
paths:
6+
- 'src/LEGO.AsyncAPI/**'
67
- 'src/LEGO.AsyncAPI.Readers/**'
78
- ".github/workflows/release-package.yml"
89
- '!**/*.md'
@@ -24,8 +25,14 @@ jobs:
2425
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
2526

2627
- name: Build LEGO.AsyncAPI project and pack NuGet package
27-
run: dotnet pack src/LEGO.AsyncAPI.Readers/LEGO.AsyncAPI.Readers.csproj -c Release -o out -p:PackageVersion=1.0.$GITHUB_RUN_ID
28+
run: dotnet pack src/LEGO.AsyncAPI/LEGO.AsyncAPI.csproj -c Release -o out -p:PackageVersion=1.0.$GITHUB_RUN_ID.$GITHUB_RUN_NUMBER
2829

2930
- name: Push generated package to GitHub Packages registry
30-
run: dotnet nuget push out/*.nupkg --skip-duplicate --no-symbols true --api-key ${{secrets.GITHUB_TOKEN}}
31+
run: dotnet nuget push out/*.nupkg --skip-duplicate -n --api-key ${{secrets.GITHUB_TOKEN}}
32+
33+
- name: Build LEGO.AsyncAPI.Readers project and pack NuGet package
34+
run: dotnet pack src/LEGO.AsyncAPI.Readers/LEGO.AsyncAPI.Readers.csproj -c Release -o out_readers -p:PackageVersion=1.0.$GITHUB_RUN_ID.$GITHUB_RUN_NUMBER
35+
36+
- name: Push generated package to GitHub Packages registry
37+
run: dotnet nuget push out_readers/*.nupkg --skip-duplicate -n --api-key ${{secrets.GITHUB_TOKEN}}
3138

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@
44

55
Serialization and Deserialization of json/yaml AsyncAPI specifications into dotnet classes.
66

7+
8+
## Getting started
9+
10+
1. Read Async API specification [here](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md)
11+
2. Explore [example projects](https://github.com/LEGO/AsyncAPI.NET/tree/main/examples).
12+
3. Add dependency to LEGO.AsyncAPI.Readers Nuget package in order to transform your Async API specs into AsyncApiDocument C# object.
13+
- Download Nuget.exe
14+
- Run
15+
nuget.exe sources Add -Name "LEGO GitHub Package Registry" -Source https://nuget.pkg.github.com/lego/index.json -username {your lego email} -password {your Github PAT with packages-read permission and SSO enabled}
16+
- Add latest release version of package LEGO.AsyncAPI.Readers to your .Net project.
17+
4. Contribute following the [contribution guide](CONTRIBUTION.md).
18+
19+
720
## Contribution
821

9-
Do you want to contribute to the project? Find out how [here](CONTRIBUTION.md)
22+
Do you want to contribute to the project? Find out how [here](CONTRIBUTION.md).
23+
24+
25+
## License
26+
27+
AsyncAPI.Net is copyright LEGO Group.

src/LEGO.AsyncAPI.Readers/LEGO.AsyncAPI.Readers.csproj

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
<TargetFramework>net6.0</TargetFramework>
55
<ImplicitUsings>disable</ImplicitUsings>
66
<Nullable>disable</Nullable>
7-
</PropertyGroup>
7+
<PackageProjectUrl>https://github.com/LEGO/AsyncAPI.NET</PackageProjectUrl>
8+
<Description>AsyncAPI.NET Readers for JSON and YAML documents</Description>
9+
<PackageTags>AsyncAPI .NET</PackageTags>
10+
<PackageId>LEGO.AsyncAPI.Readers</PackageId>
11+
<Version>1.0.0</Version>
12+
<AssemblyName>LEGO.AsyncAPI.Readers</AssemblyName>
13+
<RootNamespace>LEGO.AsyncAPI.Readers</RootNamespace>
14+
<RepositoryUrl>https://github.com/LEGO/AsyncAPI.NET</RepositoryUrl>
15+
</PropertyGroup>
816

917
<ItemGroup>
1018
<None Remove="stylecop.json" />
@@ -24,11 +32,11 @@
2432
</ItemGroup>
2533

2634
<ItemGroup>
27-
<ProjectReference Include="..\LEGO.AsyncAPI\LEGO.AsyncAPI.csproj" />
35+
<InternalsVisibleTo Include="LEGO.AsyncAPI.Tests" />
2836
</ItemGroup>
2937

3038
<ItemGroup>
31-
<InternalsVisibleTo Include="LEGO.AsyncAPI.Tests" />
39+
<ProjectReference Include="..\LEGO.AsyncAPI\LEGO.AsyncAPI.csproj" />
3240
</ItemGroup>
3341

3442
</Project>

src/LEGO.AsyncAPI/LEGO.AsyncAPI.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
55
<ImplicitUsings>disable</ImplicitUsings>
6+
<PackageProjectUrl>https://github.com/LEGO/AsyncAPI.NET</PackageProjectUrl>
7+
<Description>AsyncAPI.NET models</Description>
8+
<PackageTags>AsyncAPI .NET</PackageTags>
9+
<PackageId>LEGO.AsyncAPI</PackageId>
10+
<Version>1.0.0</Version>
11+
<AssemblyName>LEGO.AsyncAPI</AssemblyName>
12+
<RootNamespace>LEGO.AsyncAPI</RootNamespace>
13+
<RepositoryUrl>https://github.com/LEGO/AsyncAPI.NET</RepositoryUrl>
614
</PropertyGroup>
715

816
<ItemGroup>

0 commit comments

Comments
 (0)