Skip to content

Release IOTHub Client Generator to Nuget #23

Release IOTHub Client Generator to Nuget

Release IOTHub Client Generator to Nuget #23

name: Release IOTHub Client Generator to Nuget
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Create Nuget Package
run: dotnet pack -c Release /p:VersionNumber=${{ github.event.release.tag_name}} /p:PackageReleaseNotes="See https://github.com/alonf/IoTHubClientGenerator/releases/tag/${{github.event.release.tag_name}}" IoTHubClientGenerator/IoTHubClientGenerator.csproj
- name: Archive Nuget Package for IoTHubClientGenerator
uses: actions/upload-artifact@v3
with:
name: packages
path: "IoTHubClientGenerator/bin/Release/IoTHubClientGenerator.${{github.event.release.tag_name}}.nupkg"
- name: Publish Nuget Package
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.nuget_api_key }} --source https://api.nuget.org/v3/index.json