From 74236597f31657b8e7babb421a0b656016cc2ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Bu=C4=9Fra=20K=C3=B6sen?= <32344242+bugrakosen@users.noreply.github.com> Date: Sat, 14 Sep 2024 23:06:15 +0300 Subject: [PATCH] Create nuget.yml --- .github/workflows/nuget.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 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..d4df531 --- /dev/null +++ b/.github/workflows/nuget.yml @@ -0,0 +1,26 @@ +name: Milvasoft.Templates Nuget Publish + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 8.0.x + - name: Restore Milvasoft.Templates project dependencies + run: dotnet restore Milvasoft.Templates.csproj + - name: Build Milvasoft.Templates project + run: dotnet build Milvasoft.Templates.csproj --no-restore --configuration Release + - name: Pack Milvasoft.Templates project + run: dotnet pack Milvasoft.Templates.csproj --no-build --configuration Release --include-symbols -p:SymbolPackageFormat=snupkg -o . + - name: Publish package to NuGet + run: dotnet nuget push *.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate