Removed also netcoreapp from targets #360
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: StackExchange.Redis.Extensions Build | |
on: | |
push: | |
branches: | |
- nuget | |
tags: | |
- "*.*.*" | |
jobs: | |
# Label of the container job | |
runner-job: | |
# You must use a Linux environment when using service containers or container jobs | |
runs-on: ubuntu-latest | |
# Service containers to run with `runner-job` | |
services: | |
# Label used to access the service container | |
redis: | |
# Docker Hub image | |
image: redis | |
# Set health checks to wait until redis has started | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps port 6379 on service container to the host | |
- 6379:6379 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
2.1.x | |
6.0.x | |
7.0.x | |
8.0.x | |
- name: Run .NET 8 Tests | |
run: dotnet test -f net8.0 --verbosity quiet | |
shell: bash | |
env: | |
REDIS_HOST: localhost | |
- name: Run .NET 7 Tests | |
run: dotnet test -f net7.0 --verbosity quiet | |
shell: bash | |
env: | |
REDIS_HOST: localhost | |
- name: Run .NET 6 Tests | |
run: dotnet test -f net6.0 --verbosity quiet | |
shell: bash | |
env: | |
REDIS_HOST: localhost | |
- name: Run netcoreapp2.1 Tests | |
run: dotnet test -f netcoreapp2.1 --verbosity quiet | |
shell: bash | |
env: | |
REDIS_HOST: localhost | |
publish: | |
needs: runner-job | |
name: Publish Nuget Packages | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
2.1.x | |
6.0.x | |
7.0.x | |
8.0.x | |
- name: Build with dotnet | |
run: ./NuGetPack.bat | |
shell: bash | |
- name: Publish nuget | |
run: | | |
for f in ./packages/*.nupkg | |
do | |
dotnet nuget push $f --api-key ${{ secrets.NuGetApiKey}} --source https://api.nuget.org/v3/index.json | |
done | |
shell: bash |