chore(deps): update dependency microsoft.net.test.sdk to v17.7.0 (#248) #127
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: πΏ CI | |
on: | |
push: | |
branches: | |
- "main" | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- "main" | |
workflow_dispatch: | |
jobs: | |
build: | |
name: π Build & Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: π Checkout | |
uses: actions/checkout@v3 | |
- name: π Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
2.1.x | |
2.2.x | |
3.0.x | |
3.1.x | |
5.0.x | |
6.0.x | |
7.0.x | |
- name: β Restore | |
run: dotnet restore | |
- name: π Build | |
run: dotnet build --no-restore -c Release -p:ContinuousIntegrationBuild=true | |
- name: π§ͺ Run tests | |
run: dotnet test --no-build -c Release --filter FullyQualifiedName\!~Tests.Integration -p:CollectCoverage=true -e:CoverletOutputFormat=opencover | |
- name: β’ Publish to Codecov | |
uses: codecov/codecov-action@v3 | |
- name: π Pack Dev artifacts | |
if: github.ref == 'refs/heads/main' | |
run: dotnet pack --no-build -c Release --version-suffix dev-$(date +%s)-${GITHUB_SHA::7} | |
- name: π Pack artifacts | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: dotnet pack --no-build -c Release | |
- name: π€ Upload artifacts | |
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nupkgs | |
path: src/**/*nupkg | |
github: | |
name: π Deploy to GitHub | |
needs: [build] | |
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: π₯ Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: nupkgs | |
- name: π¦ Push to pkg.github.com | |
run: dotnet nuget push "**/*.nupkg" -s https://nuget.pkg.github.com/prom-client-net/index.json -k ${{ secrets.GH_FULL_PAT }} --skip-duplicate | |
nuget: | |
name: π Deploy to NuGet | |
needs: [build] | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: π₯ Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: nupkgs | |
- name: π¦ Push to nuget.org | |
run: dotnet nuget push "**/*.nupkg" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_DEPLOY_KEY }} |