Skip to content

Bump version .netstandard to 2.1 and .net 10 in tests #36

Bump version .netstandard to 2.1 and .net 10 in tests

Bump version .netstandard to 2.1 and .net 10 in tests #36

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET Release
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
buildAndPublish:
runs-on: ubuntu-latest
environment: Nuget env
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.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: Build packages
run: dotnet build -c Release
- name: publish package
env:
NUGET_KEY: ${{ secrets.NUKEG_KEY }}
TEST_VAR: ${{ secrets.TEST }}
run: |
dotnet nuget push **/bin/Release/**/*.nupkg --api-key $NUGET_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate