Update workflows #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ndjson.AsyncStreams.Net.Http - CD | |
on: | |
push: | |
tags: | |
- "net-http-v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
deployment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Extract VERSION | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\/net-http-v/}" >> $GITHUB_ENV | |
- name: Setup .NET Core 3.1 SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '3.1.x' | |
- name: Setup .NET 5.0 SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '5.0.x' | |
- name: Setup .NET 6.0 SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Setup .NET 7.0 SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '7.0.x' | |
- name: Restore | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test --configuration Release --no-build | |
- name: Pack | |
run: dotnet pack --configuration Release --no-build | |
- name: NuGet Push Ndjson.AsyncStreams.Net.Http | |
run: dotnet nuget push src/Ndjson.AsyncStreams.Net.Http/bin/Release/Ndjson.AsyncStreams.Net.Http.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_API_KEY} | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
- name: Publish Documentation | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: docs/Ndjson.AsyncStreams.DocFx/wwwroot |