Skip to content

updated dependencies #85

updated dependencies

updated dependencies #85

name: Deploy nupkg
env:
dotnet_version: 6.0.x
project_name: "ScriptInjection/ScriptInjection.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@v3
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 -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -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