Skip to content

Update .NET SDK

Update .NET SDK #33

Workflow file for this run

name: .NET
on:
push:
branches:
- main
pull_request:
branches:
- main
- '*'
env:
CI: 'true'
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 'true'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore -v n
- name: signing key
run: echo ${{ secrets.SNKEY }} | base64 -d > key.snk
- name: Build
run: dotnet build --no-restore -v n
- name: Make packages
run: |
dotnet pack -v n --no-build --no-restore --output ./artifacts/ src/Pdsr.Http
dotnet pack -v n --no-build --no-restore --output ./artifacts/ src/Pdsr.Http.Extensions
- name: Upload package artifacts
uses: actions/upload-artifact@v2
if: github.ref == 'refs/heads/main'
with:
name: nuget-packages
path: |
**/*.nupkg
**/*.snupkg
- name: Publish packages
if: github.ref == 'refs/heads/main'
run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }}