Skip to content

updated dependencies #62

updated dependencies

updated dependencies #62

name: Deploy nupkg
env:
dotnet_version: 8.0.x
project_name: "ApiGroupGenerator/ApiGroupGenerator.csproj"
on:
push:
branches: [ main ]
jobs:
build_and_deploy:
if: "contains(github.event.head_commit.message, '[deploy]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet_version }}
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-restore
- name: Pack
run: dotnet pack -c Release -o app/packed --no-restore ${{ env.project_name }}
- name: Deploy to nuget
run: dotnet nuget push -s https://api.nuget.org/v3/index.json app/packed/*.nupkg -k ${{ secrets.NUGETKEY }} > push_log || grep "409" push_log