This repository houses GitHub actions to Nuget Packages out of Avro schema files and publish them.
Please have a look at avro-nuget-sandbox repository as an example.
- After change the code in any action, you can use
make pack-build
to build the container on your local dev environment. - Running
make pack-run
will generate the code and pack it as a NuGet package and store it in theartifacts
folder. - There are some other targets in the Makefile which could help you for debugging. Please remember the Makefile requires
avro-nuget-sandbox
as a sibling repository on your local env. - When you are happy with your changes commit the code and push to github.
- Finally create a new release by choosing a proper tag.
- You can test the actions on GitHub workflow from [avro-nuget-sandbox]. Please remember to update the actions versions here and here to the latest release version.
The pack
action generate a Nuget package out of the given Avro schema files and has the following inputs:
Required The name of the NuGet package.
Required The version of the NuGet package.
Required The path to the folder containing Avro schema files.
Required The path to the put generated package at.
The name of the company publishing the package. The default value is Education Perfect
.
The authors of the package. The default value is Team VOID
.
uses: EducationPerfect/avro-nuget/[email protected]
with:
package-name: 'AwesomePackage'
package-version: 1.0.0
avro-dir-path: ./avro
output-path: ./packages
authors: 'Team Void'
The public
action publish the given Nuget packages to s given source and has the following inputs:
Required The path of the NuGet package. (e.g. ./packages/*.nupkg)
Required The source for hosting NuGet packages.
Required The API Key of the source.
uses: EducationPerfect/avro-nuget/[email protected]
with:
packages: ./packages/*.nupkg
source: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
api-key: ${{ github.token }}