Update dependency Verify.Xunit to 30.7.0 (#925) #1403
This file contains hidden or 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: | |
tags: | |
- '[0-9].[0-9]+.[0-9]' | |
- '[0-9].[0-9]+.[0-9]+-*' | |
branches: | |
- master | |
- release-* | |
pull_request: | |
workflow_dispatch: | |
env: | |
DOTNET_NOLOGO: true | |
jobs: | |
build: | |
name: Build and test on ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
name: Windows | |
- os: ubuntu-latest | |
name: Linux | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4.3.1 | |
with: | |
dotnet-version: | | |
8.0.x | |
9.0.x | |
- name: Build | |
run: dotnet build src --configuration Release | |
- name: Tests | |
run: dotnet test src --configuration Release --no-build | |
- name: Upload packages | |
if: matrix.name == 'Linux' | |
uses: actions/upload-artifact@v4.6.2 | |
with: | |
name: nuget-packages | |
path: nugets/ | |
retention-days: 2 | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4.2.2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4.3.1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Download artifacts | |
uses: actions/download-artifact@v4.3.0 | |
with: | |
name: nuget-packages | |
path: nugets/ | |
- name: Check Tag Type | |
id: check-tag-type | |
if: github.ref_type == 'tag' | |
run: | | |
if [[ ${{ github.ref_name }} =~ [0-9]+.[0-9]+.[0-9]+$ ]]; then | |
echo "release-type=production" >> $GITHUB_OUTPUT | |
else | |
echo "release-type=pre-release" >> $GITHUB_OUTPUT | |
fi | |
- name: Deploy pre-release to Feedz.io | |
if: steps.check-tag-type.outputs.release-type == 'pre-release' | |
run: | | |
echo "Tag is pre-release" | |
echo "Pushing package to Feedz.io" | |
dotnet nuget push ./nugets/*.nupkg --source https://f.feedz.io/servicecomposer/pre-releases/nuget --api-key ${{ secrets.FEEDZ_API_KEY }} | |
echo "Pushing Symbols to Feedz.io" | |
dotnet nuget push ./nugets/*.snupkg --source https://f.feedz.io/servicecomposer/pre-releases/symbols --api-key ${{ secrets.FEEDZ_API_KEY }} | |
- name: Deploy release to NuGet | |
if: steps.check-tag-type.outputs.release-type == 'production' | |
run: | | |
echo "Tag is production" | |
echo "Pushing package to NuGet.org" | |
dotnet nuget push ./nugets/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} | |
echo "Pushing Symbols to NuGet.org" | |
dotnet nuget push ./nugets/*.snupkg --api-key ${{ secrets.NUGET_API_KEY }} |