diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 504c13e..3ac9bda 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -28,3 +28,15 @@ jobs: - name: Integration Tests run: dotnet test --no-build --verbosity normal + + release: + runs-on: ubuntu-latest + needs: build + if: startsWith(github.ref, 'refs/tags/') + + steps: + - name: Create package + run: dotnet pack --no-build --output nupkgs --version-suffix ${{ steps.branch_name.outputs.SOURCE_TAG }} + + - name: Publish package + run: dotnet nuget push nupkgs/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json \ No newline at end of file diff --git a/src/carbon-intensity-sdk/carbon-intensity-sdk.csproj b/src/carbon-intensity-sdk/carbon-intensity-sdk.csproj index 5339d47..18e2fad 100644 --- a/src/carbon-intensity-sdk/carbon-intensity-sdk.csproj +++ b/src/carbon-intensity-sdk/carbon-intensity-sdk.csproj @@ -10,9 +10,10 @@ An unofficial library for the Carbon Intensity API for use in C# application README.md https://github.com/evansabove/carbon-intensity-sdk + CC-BY-4.0 - + True