From 5acdefc30b4b8760fae597523ecd5cfc4ff8e1ad Mon Sep 17 00:00:00 2001 From: Enes <9263360+EnessenE@users.noreply.github.com> Date: Fri, 14 Oct 2022 16:16:42 +0200 Subject: [PATCH 1/2] Create nuget push --- .github/workflows/nuget.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 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..7f58b57 --- /dev/null +++ b/.github/workflows/nuget.yml @@ -0,0 +1,25 @@ +name: .NET + +on: + push: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 6.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal + - name: Publish + run: dotnet nuget push CM.Text/CM.Text.csproj --api-key ${{ secrets.nuget_apikey }} From 498e88b26c5e714c26494a8d5a81671785ab4530 Mon Sep 17 00:00:00 2001 From: Enes <9263360+EnessenE@users.noreply.github.com> Date: Fri, 14 Oct 2022 16:21:16 +0200 Subject: [PATCH 2/2] Update nuget.yml --- .github/workflows/nuget.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml index 7f58b57..f3bd5da 100644 --- a/.github/workflows/nuget.yml +++ b/.github/workflows/nuget.yml @@ -1,8 +1,8 @@ name: .NET on: - push: - branches: [ "master" ] + release: + types: created jobs: build: @@ -22,4 +22,4 @@ jobs: - name: Test run: dotnet test --no-build --verbosity normal - name: Publish - run: dotnet nuget push CM.Text/CM.Text.csproj --api-key ${{ secrets.nuget_apikey }} + run: dotnet nuget push CM.Text/CM.Text.csproj --api-key ${{ secrets.nuget_apikey }}