From 46edf6599d549c27ff3e821c284ef04fd8aa1e21 Mon Sep 17 00:00:00 2001 From: Dima yawaflua <93622229+yawaflua@users.noreply.github.com> Date: Sun, 10 Dec 2023 23:41:39 +0300 Subject: [PATCH] Create nuget.yml --- .github/workflows/nuget.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/nuget.yml diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml new file mode 100644 index 0000000..71b93d5 --- /dev/null +++ b/.github/workflows/nuget.yml @@ -0,0 +1,29 @@ +name: NetLicensing C# Client - Release + +on: + release: + types: [release] + +jobs: + publish-nuget: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '8.x.x' + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Set output + id: vars + run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT + - name: Publish to NuGet + uses: brandedoutcast/publish-nuget@v2 + with: + PROJECT_FILE_PATH: NetLicensingClient.csproj + VERSION_REGEX: ${{ steps.vars.outputs.tags }} + TAG_FORMAT: '*' + NUGET_KEY: ${{secrets.NUGET_API_KEY}}